Created
August 3, 2022 22:47
-
-
Save guilhermecarvalhocarneiro/982de2a2815a3895202e67182d075176 to your computer and use it in GitHub Desktop.
Arquivo docker para ambiente de desenvolvimento
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: '3.4' | |
services: | |
database: | |
image: postgres:14.3 | |
restart: always | |
volumes: | |
- iteea-db:/var/lib/postgresql/data | |
environment: | |
- LC_ALL=C.UTF-8 | |
- POSTGRES_DB=iteea_db | |
- POSTGRES_USER=postgres | |
- POSTGRES_PASSWORD=123 | |
networks: | |
- dev | |
web: | |
image: iteea | |
environment: | |
- DB_NAME=iteea_db | |
- DB_PASSWORD=123 | |
- DB_USER=postgres | |
- DB_HOST=database | |
- DB_PORT=5432 | |
- DEBUG=True | |
build: | |
context: . | |
dockerfile: DockerfileDev | |
networks: | |
- dev | |
command: bash -c "python manage.py makemigrations; python manage.py migrate; python manage.py collectstatic; python manage.py runserver 0.0.0.0:8000;" | |
volumes: | |
- .:/app | |
ports: | |
- 8000:8000 | |
depends_on: | |
- database | |
volumes: | |
iteea-db: | |
networks: | |
dev: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment