-
Notifications
You must be signed in to change notification settings - Fork 20
/
docker-compose.yml
93 lines (85 loc) · 2.11 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
version: "3.8"
services:
db:
container_name: dicas_de_django_db
image: postgres:14-alpine
restart: always
user: postgres # importante definir o usuário
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- LC_ALL=C.UTF-8
- POSTGRES_PASSWORD=postgres # senha padrão
- POSTGRES_USER=postgres # usuário padrão
- POSTGRES_DB=dicas_de_django_db # necessário porque foi configurado assim no settings
ports:
- 5431:5432 # repare na porta externa 5431
networks:
- dicas-de-django-network
pgadmin:
container_name: dicas_de_django_pgadmin
image: dpage/pgadmin4
restart: unless-stopped
volumes:
- pgadmin:/var/lib/pgadmin
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
PGADMIN_CONFIG_SERVER_MODE: 'False'
ports:
- 5051:80
networks:
- dicas-de-django-network
mailhog:
container_name: dicas_de_django_mailhog
image: mailhog/mailhog
restart: always
logging:
driver: 'none'
ports:
- 1025:1025
- 8025:8025
networks:
- dicas-de-django-network
app:
build:
context: .
dockerfile: Dockerfile
container_name: dicas_de_django_app
hostname: app
stdin_open: true
expose:
- '8000'
volumes:
- .env.docker:/app/.env
command: bash -c "gunicorn backend.wsgi:application -b 0.0.0.0:8000"
depends_on:
- db
networks:
- dicas-de-django-network
nginx:
container_name: dicas_de_django_nginx
image: nginx
hostname: nginx
ports:
- '80:8000'
volumes:
- ./docker/config/nginx/:/etc/nginx/conf.d/
depends_on:
- app
networks:
- dicas-de-django-network
cloudbeaver:
container_name: dicas_de_django_cloudbeaver
image: dbeaver/cloudbeaver:latest
volumes:
- /var/cloudbeaver/workspace:/opt/cloudbeaver/workspace
ports:
- 5052:8978
networks:
- dicas-de-django-network
volumes:
pgdata: # mesmo nome do volume externo definido na linha 10
pgadmin:
networks:
dicas-de-django-network: