/
docker-compose.yml
117 lines (108 loc) · 2.03 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
services:
webapp:
restart: always
build: .
container_name: webapp
ports:
- "8000:8000"
volumes:
- ./:/app
- ./static:/app/static
env_file:
- ./.env
command: [ "docker/webapp.sh" ]
depends_on:
- db
networks:
- pastebin_net
db:
image: postgres:16
container_name: postgres
ports:
- "5432:5432"
env_file:
- ./.env
volumes:
- postgres_data:/var/lib/postgresql/data/
networks:
- pastebin_net
redis:
image: redis:7.2.4
container_name: redis
restart: always
ports:
- "6379:6379"
networks:
- pastebin_net
worker:
build: .
container_name: worker
restart: always
volumes:
- ./:/app
env_file:
- ./.env
command: [ "docker/celery.sh", "worker" ]
depends_on:
- redis
- webapp
- db
networks:
- pastebin_net
beat:
build: .
container_name: beat
restart: always
volumes:
- ./:/app
env_file:
- ./.env
command: [ "docker/celery.sh", "beat" ]
depends_on:
- redis
- webapp
- worker
- db
networks:
- pastebin_net
flower:
build: .
container_name: flower
env_file:
- ./.env
command: [ "docker/celery.sh", "flower" ]
volumes:
- ./:/app
ports:
- "5555:5555"
depends_on:
- webapp
- worker
- redis
networks:
- pastebin_net
nginx:
build: ./nginx
container_name: nginx
restart: always
volumes:
- ./static:/static
- ./certbot/conf/:/etc/letsencrypt
- ./certbot/www/:/var/www/certbot
ports:
- "80:80"
- "443:443"
depends_on:
- webapp
networks:
- pastebin_net
certbot:
image: certbot/certbot:latest
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www/:/var/www/certbot
volumes:
postgres_data:
networks:
pastebin_net: