Skip to content

Commit 39f28a2

Browse files
committed
Dockerize the app
1 parent b0187b6 commit 39f28a2

2 files changed

Lines changed: 15 additions & 58 deletions

File tree

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM jboss/wildfly:10.0.0.Final
2+
RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#70365 --silent
3+
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]

docker-compose.yml

Lines changed: 12 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,79 +2,33 @@
22
# Backend
33
#
44

5-
# Backend:: Cache for Maven (.m2 repository)
6-
mavencache:
5+
# Cache for Maven (.m2 repository)
6+
cache:
77
image: busybox
8-
labels:
9-
com.mgreau.docker4dev.backend.cache.maven: "Cache Maven"
108
volumes:
11-
- ~/.m2:/root/.m2
9+
- ./cache/.m2/repository:/root/.m2/repository
1210

1311
# Backend:: Project CodeBase
14-
mavenproject:
12+
sources:
1513
image: busybox
16-
labels:
17-
com.mgreau.docker4dev.backend.sources.javaee7: "Java sources"
1814
volumes:
1915
- .:/myproject
2016

2117
# 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
2721
volumes_from:
28-
- mavencache
29-
- mavenproject
22+
- cache
23+
- sources
3024
working_dir: /myproject
3125
environment:
32-
MAVEN_OPTS: -Xshare:auto -Xms128M -Xmx1G -XX:MaxPermSize=256M
26+
MAVEN_OPTS: -Xshare:auto -Xms128M -Xmx1G
3327

3428
# Backend:: Run Backend
35-
wildflydeploy:
36-
build: _docker/dev/appservers/.
37-
labels:
38-
com.mgreau.wilfly.websocket: "Deploy App"
29+
deploy:
30+
build: .
3931
ports:
4032
- "8080:8080"
4133
volumes:
4234
- ./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

Comments
 (0)