Skip to content

Instantly share code, notes, and snippets.

@varsubham
Created March 26, 2021 12:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save varsubham/29bdffff6e7ed12eb367aafa6f91b7e5 to your computer and use it in GitHub Desktop.
Save varsubham/29bdffff6e7ed12eb367aafa6f91b7e5 to your computer and use it in GitHub Desktop.
docker-compose file for nodejs and MYSQL
version: "3.8"
services:
db:
build: ./db
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: test
restart: always
web:
build: ./web
environment:
MYSQL_DATABASE: test
MYSQL_USER: root
MYSQL_PASSWORD: password
MYSQL_HOST: db
ports:
- "5000:5000"
depends_on:
- db
restart: on-failure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment