|
2 | 2 | # Backend |
3 | 3 | # |
4 | 4 |
|
5 | | -# Backend:: Cache for Maven (.m2 repository) |
6 | | -mavencache: |
| 5 | +# Cache for Maven (.m2 repository) |
| 6 | +cache: |
7 | 7 | image: busybox |
8 | | - labels: |
9 | | - com.mgreau.docker4dev.backend.cache.maven: "Cache Maven" |
10 | 8 | volumes: |
11 | | - - ~/.m2:/root/.m2 |
| 9 | + - ./cache/.m2/repository:/root/.m2/repository |
12 | 10 |
|
13 | 11 | # Backend:: Project CodeBase |
14 | | -mavenproject: |
| 12 | +sources: |
15 | 13 | image: busybox |
16 | | - labels: |
17 | | - com.mgreau.docker4dev.backend.sources.javaee7: "Java sources" |
18 | 14 | volumes: |
19 | 15 | - .:/myproject |
20 | 16 |
|
21 | 17 | # Backend:: Build project |
22 | | -mavenbuild: |
23 | | - image: vyolin/alpine-maven |
24 | | - labels: |
25 | | - com.mgreau.docker4dev.backend.build.javaee7: "Build app" |
26 | | - command: mvn clean package -gs /root/.m2/settings.xml -DfinalName=usopen |
| 18 | +build: |
| 19 | + image: maven:3.2.3-jdk-8 |
| 20 | + command: mvn clean package -DfinalName=usopen |
27 | 21 | volumes_from: |
28 | | - - mavencache |
29 | | - - mavenproject |
| 22 | + - cache |
| 23 | + - sources |
30 | 24 | working_dir: /myproject |
31 | 25 | environment: |
32 | | - MAVEN_OPTS: -Xshare:auto -Xms128M -Xmx1G -XX:MaxPermSize=256M |
| 26 | + MAVEN_OPTS: -Xshare:auto -Xms128M -Xmx1G |
33 | 27 |
|
34 | 28 | # Backend:: Run Backend |
35 | | -wildflydeploy: |
36 | | - build: _docker/dev/appservers/. |
37 | | - labels: |
38 | | - com.mgreau.wilfly.websocket: "Deploy App" |
| 29 | +deploy: |
| 30 | + build: . |
39 | 31 | ports: |
40 | 32 | - "8080:8080" |
41 | 33 | volumes: |
42 | 34 | - ./target/usopen/:/opt/jboss/wildfly/standalone/deployments/ROOT.war/ |
43 | | - |
44 | | -# |
45 | | -# Frontend |
46 | | -# |
47 | | -# Frontend:: Cache for Node (.node_modules repository) |
48 | | -nodecache: |
49 | | - image: busybox |
50 | | - labels: |
51 | | - com.mgreau.docker4dev.frontend.cache.node: "Cache Node dependencies" |
52 | | - volumes: |
53 | | - - ~/.node_modules:/root/.node_modules |
54 | | - |
55 | | -bowercache: |
56 | | - image: busybox |
57 | | - labels: |
58 | | - com.mgreau.docker4dev.frontend.cache.bower: "Cache Bower dependencies" |
59 | | - volumes: |
60 | | - - ~/.bower_components:/root/.bower_components |
61 | | - |
62 | | -#To Build the frontend based on Angular and Material Design |
63 | | -nodebuild: |
64 | | - build: _docker/dev/builds/frontend/ |
65 | | - command: npm config set cache /root/.node_modules --global && npm install && bower install --config.storage.cache=/root/.bower_components |
66 | | - volumes: |
67 | | - - ./frontend:/data |
68 | | - volumes_from: |
69 | | - - nodecache |
70 | | - - bowercache |
71 | | - environment: |
72 | | - NODE_PATH: /root/.node_modules |
73 | | - |
74 | | -# Frontend:: Project CodeBase |
75 | | -angularproject: |
76 | | - image: busybox |
77 | | - labels: |
78 | | - com.mgreau.docker4dev.websocket: "Web sources" |
79 | | - volumes: |
80 | | - - .:/myproject |
0 commit comments