Skip to content

Commit b0187b6

Browse files
committed
Docker4Dev: All env with Docker
1 parent 7bc8590 commit b0187b6

9 files changed

Lines changed: 88 additions & 10 deletions

File tree

_docker/common/commons.yml

Whitespace-only changes.

_docker/common/database.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
dbdata:
2+
image: mysql:5.6
3+
volumes:
4+
- /var/lib/mysql
5+
6+
dbserver:
7+
image: mysql:5.6
8+
volumes_from:
9+
- dbdata
10+
environment:
11+
- MYSQL_ROOT_PASSWORD=mgreau
12+
- MYSQL_DATABASE=tennistour
13+
- MYSQL_USER=mgreau
14+
- MYSQL_PASSWORD=javaee7

_docker/dev/appservers/Dockerfile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
FROM jboss/wildfly:8.2.1.Final
22

3-
RUN mkdir /tmp/myapp
4-
VOLUME ["/opt/jboss/wildfly/standalone/deployments/"]
3+
RUN mkdir -p /opt/jboss/wildfly/standalone/deployments/ROOT.war
4+
RUN touch /opt/jboss/wildfly/standalone/deployments/ROOT.war.dodeploy
5+
6+
VOLUME ["/opt/jboss/wildfly/standalone/deployments/ROOT.war/"]
57

_docker/dev/backend-build.yml

Whitespace-only changes.

_docker/dev/backend.yml

Whitespace-only changes.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Pull base image.
2+
FROM node:0.12.4
3+
4+
ENV APP_USER mgreau
5+
6+
# add our user and group first to make sure their IDs get assigned consistently, regardless of whatever dependencies get added
7+
RUN useradd --create-home --user-group --shell /bin/bash ${APP_USER}
8+
9+
10+
# Install Bower & Grunt
11+
RUN npm install -g bower grunt-cli
12+
13+
USER ${APP_USER}
14+
15+
# Define working directory.
16+
WORKDIR /data
17+
18+
# Define default command.
19+
CMD ["bash"]

_docker/dev/frontend-build.yml

Whitespace-only changes.

_docker/dev/frontend.yml

Whitespace-only changes.

docker-compose.yml

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,80 @@
1-
# Cache for Maven (.m2 repository)
1+
#
2+
# Backend
3+
#
4+
5+
# Backend:: Cache for Maven (.m2 repository)
26
mavencache:
37
image: busybox
48
labels:
5-
com.mgreau.wilfly.websocket: "Cache Maven"
9+
com.mgreau.docker4dev.backend.cache.maven: "Cache Maven"
610
volumes:
711
- ~/.m2:/root/.m2
812

9-
# Project Base
13+
# Backend:: Project CodeBase
1014
mavenproject:
1115
image: busybox
1216
labels:
13-
com.mgreau.wilfly.websocket: "Java sources"
17+
com.mgreau.docker4dev.backend.sources.javaee7: "Java sources"
1418
volumes:
1519
- .:/myproject
1620

21+
# Backend:: Build project
1722
mavenbuild:
1823
image: vyolin/alpine-maven
1924
labels:
20-
com.mgreau.wilfly.websocket: "Build app"
21-
command: mvn clean package -gs /root/.m2/settings.xml
25+
com.mgreau.docker4dev.backend.build.javaee7: "Build app"
26+
command: mvn clean package -gs /root/.m2/settings.xml -DfinalName=usopen
2227
volumes_from:
2328
- mavencache
2429
- mavenproject
2530
working_dir: /myproject
2631
environment:
2732
MAVEN_OPTS: -Xshare:auto -Xms128M -Xmx1G -XX:MaxPermSize=256M
2833

29-
34+
# Backend:: Run Backend
3035
wildflydeploy:
3136
build: _docker/dev/appservers/.
3237
labels:
3338
com.mgreau.wilfly.websocket: "Deploy App"
3439
ports:
3540
- "8080:8080"
3641
volumes:
37-
- ./target:/opt/jboss/wildfly/standalone/deployments/
42+
- ./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)