Skip to content

Instantly share code, notes, and snippets.

@ahmedsadman
Created June 12, 2020 22:29
Show Gist options
  • Save ahmedsadman/19b5203cabde07406495b7524d9a3c34 to your computer and use it in GitHub Desktop.
Save ahmedsadman/19b5203cabde07406495b7524d9a3c34 to your computer and use it in GitHub Desktop.
version: '3.6'
volumes:
database:
services:
api:
build: .
depends_on:
- mysqldb
environment:
SQLALCHEMY_DATABASE_URI: mysql+pymysql://root:root@mysqldb/test_db
networks:
- default
ports:
- 5000:5000
restart: always
mysqldb:
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test_db
image: mysql:latest
networks:
- default
ports:
- 32000:3306
restart: always
volumes:
- database:/var/lib/mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment