Skip to content

Instantly share code, notes, and snippets.

@riquellopes
Created June 3, 2020 21:01
Show Gist options
  • Save riquellopes/0d5dc76cd7d6dd1a212b6d0b9f601a1f to your computer and use it in GitHub Desktop.
Save riquellopes/0d5dc76cd7d6dd1a212b6d0b9f601a1f to your computer and use it in GitHub Desktop.
Simple docker compose file.
version: '2'
services:
example:
build: .
container_name: web-example
working_dir: /web_example
volumes:
- .:/web_example
command: sh -c "python manage.py runserver_plus 0.0.0.0:5000 --settings=web_example.settings.local"
expose:
- 5000
ports:
- 5000:5000
env_file:
- .env
environment:
PORT: 5000
depends_on:
- database-example
links:
- database-example
stdin_open: true
database-example:
container_name: database_example
image: mysql:5.7
expose:
- "3306"
environment:
- MYSQL_ALLOW_EMPTY_PASSWORD=yes
- MYSQL_DATABASE=example
ports:
- 3306:3306
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment