Created
March 27, 2019 23:11
-
-
Save lachlanagnew/0c6e1e39c2f9460bbcf4ebf4f6895fc9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2" | |
services: | |
mysql-db: | |
image: mysql/mysql-server:5.7 | |
environment: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_USER: dbuser | |
MYSQL_PASSWORD: dbuserpwd | |
MYSQL_DATABASE: boilerplate_db | |
ports: | |
- "3306:3306" | |
expose: | |
- "3306" | |
volumes: | |
- db_data:/var/lib/mysql | |
networks: | |
- esnet | |
node-app: | |
build: | |
context: ./server | |
dockerfile: Dockerfile | |
depends_on: | |
- mysql-db | |
ports: | |
- "5000:5000" | |
expose: | |
- "5000" | |
volumes: | |
- ./server:/opt/app:delegated | |
- ./server/package.json:/opt/package.json | |
- ./server/package-lock.json:/opt/package-lock.json | |
- notused:/opt/app/node_modules | |
networks: | |
- esnet | |
web-client: | |
build: | |
context: ./web-client | |
dockerfile: Dockerfile | |
ports: | |
- "3000:3000" | |
expose: | |
- "3000" | |
volumes: | |
- ./web-client:/opt/app:delegated | |
- ./web-client/package.json:/opt/package.json | |
- ./web-client/package-lock.json:/opt/package-lock.json | |
- notused:/opt/app/node_modules | |
networks: | |
- esnet | |
volumes: | |
db_data: | |
notused: | |
networks: | |
esnet: | |
driver: bridge |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment