Skip to content

Instantly share code, notes, and snippets.

@lachlanagnew
Created March 27, 2019 23:11
Show Gist options
  • Save lachlanagnew/0c6e1e39c2f9460bbcf4ebf4f6895fc9 to your computer and use it in GitHub Desktop.
Save lachlanagnew/0c6e1e39c2f9460bbcf4ebf4f6895fc9 to your computer and use it in GitHub Desktop.
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