Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (102 loc) · 2.62 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (102 loc) · 2.62 KB
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
version: '3'
x-app: &app
#platform: linux/arm64/v8
build:
dockerfile: ./docker/app/Dockerfile
context: ./
args:
UID: "${UID:-1000}"
GID: "${GID:-1000}"
image: djangobase
env_file:
- .env
networks:
- helios-network
restart: "${DOCKER_RESTART_POLICY:-unless-stopped}"
stop_grace_period: "${DOCKER_STOP_GRACE_PERIOD:-3s}"
volumes:
- ./.:/var/www/helios-server
- logs_volume:/var/log/
x-celery: &celery
<<: *app
depends_on:
- redis
services:
helios:
<<: *app
command: bash -c "python manage.py migrate && python manage.py collectstatic --noinput && /start"
ports:
- "80:80"
- "443:443"
- 127.0.0.1:8000:8000
networks:
- helios-network
# depends_on:
# - db
celeryworker:
<<: *celery
command: /start-celeryworker
ports:
- 127.0.0.1:8001:8000
networks:
- helios-network
celerybeat:
<<: *celery
command: /start-celerybeat
ports:
- 127.0.0.1:8002:8000
networks:
- helios-network
redis:
image: redis:7.0.10-bullseye
environment:
TZ: America/Sao_Paulo
restart: unless-stopped
ports:
- 127.0.0.1:6379:6379
networks:
- helios-network
nginx:
build:
dockerfile: ./docker/nginx/Dockerfile
context: ./
volumes:
- ./staticfiles:/var/www/html/static
- logs_volume:/var/log/nginx
ports:
- 1337:80
# para o redis rodar no mesmo uid e gid do usuário do host,
# para evitar problemas de permissão na leitura de staticfiles
user: $UID:$GID
depends_on:
- helios
networks:
- helios-network
restart: unless-stopped
# db:
# image: postgres:12.0-alpine
# ports:
# - 5432:5432
# env_file:
# - .env
# restart: unless-stopped
# volumes:
# - postgres_volume:/var/lib/postgresql/data/
# networks:
# - helios-network
networks:
helios-network:
driver: bridge
volumes:
logs_volume:
driver: local
driver_opts:
o: bind
type: none
device: ~/docker-volumes/heliosapp/logs
# postgres_volume:
# driver: local
# driver_opts:
# o: bind
# type: none
# device: ~/docker-volumes/heliosapp/postgres