-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.prod.yml
127 lines (114 loc) · 2.49 KB
/
docker-compose.prod.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
118
119
120
121
122
123
124
125
126
127
version: '3.8'
services:
nginx:
build: ./infra/production/nginx
volumes:
- staticfiles:/app/staticfiles
- mediafiles:/app/mediafiles
- ./certbot/www/:/var/www/certbot/:ro
- ./certbot/conf/:/etc/nginx/ssl/:ro
ports:
- 80:80
- 443:443
- 5555:5555
depends_on:
- web
- flower
certbot:
image: certbot/certbot:latest
volumes:
- ./certbot/www/:/var/www/certbot/:rw
- ./certbot/conf/:/etc/letsencrypt/:rw
web:
build:
context: .
dockerfile: infra/production/django/Dockerfile
command: /start
volumes:
- staticfiles:/app/staticfiles
- mediafiles:/app/mediafiles
env_file:
- .env
environment:
DOCKER: true
depends_on:
frontend:
condition: service_completed_successfully
redis:
condition: service_started
db:
condition: service_started
frontend:
build:
context: .
dockerfile: ./infra/local/frontend/Dockerfile
command: build
volumes:
- ./frontend:/app
- /app/node_modules
db:
image: postgres:16-alpine
volumes:
- postgres_data:/var/lib/postgresql/data/
environment:
- POSTGRES_DB=hello_django
- POSTGRES_USER=hello_django
- POSTGRES_PASSWORD=hello_django
redis:
image: redis:7-alpine
celery_worker:
build:
context: .
dockerfile: infra/production/django/Dockerfile
image: walter_celery_worker
command: /start-celeryworker
volumes:
- staticfiles:/app/staticfiles
- mediafiles:/app/mediafiles
env_file:
- .env
depends_on:
- redis
- db
celery_beat:
build:
context: .
dockerfile: infra/production/django/Dockerfile
image: walter_celery_beat
command: /start-celerybeat
volumes:
- staticfiles:/app/staticfiles
- mediafiles:/app/mediafiles
env_file:
- .env
depends_on:
- redis
- db
flower:
build:
context: .
dockerfile: infra/production/django/Dockerfile
image: walter_celery_flower
command: /start-flower
volumes:
- staticfiles:/app/staticfiles
- mediafiles:/app/mediafiles
- flower_db:/app/flower_db
env_file:
- .env
depends_on:
- redis
- db
proxy:
image: 'peterdavehello/tor-socks-proxy'
ports:
- "9150:9150"
splash:
image: 'scrapinghub/splash'
ports:
- '8050:8050'
volumes:
postgres_data:
staticfiles:
mediafiles:
flower_db: