Skip to content

Instantly share code, notes, and snippets.

@kohendrix
Last active March 1, 2019 07:21
Show Gist options
  • Select an option

  • Save kohendrix/7a631aa1ef38dc558ec29db044dcce46 to your computer and use it in GitHub Desktop.

Select an option

Save kohendrix/7a631aa1ef38dc558ec29db044dcce46 to your computer and use it in GitHub Desktop.
node + mysql setup
version: '3'
services:
app:
build:
context: .
dockerfile: ./node/Dockerfile
container_name: node_app
ports:
- '3000:3000'
- '9229:9229'
env_file: .env
volumes:
- .:/home/app
- /home/app/node_modules
tty: true
depends_on:
- mysql
networks:
- mynetwork
mysql:
build:
context: .
dockerfile: ./mysql/Dockerfile
container_name: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: me
MYSQL_PASSWORD: password
MYSQL_DATABASE: sso_db
volumes:
- ./db_data/mysql:/var/lib/mysql
networks:
- mynetwork
networks:
mynetwork:
driver: bridge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment