Created
June 3, 2020 21:01
-
-
Save riquellopes/0d5dc76cd7d6dd1a212b6d0b9f601a1f to your computer and use it in GitHub Desktop.
Simple docker compose file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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