-
Notifications
You must be signed in to change notification settings - Fork 45
/
Copy pathdocker-compose-prod.yaml
106 lines (100 loc) · 2.69 KB
/
docker-compose-prod.yaml
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
services:
volweb-postgresdb:
container_name: volweb-postgresdb
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
image: postgres:14.1
restart: always
ports:
- 5432:5432
volumes:
- postgres-data:/var/lib/postgresql/data
volweb-redis:
container_name: volweb-redis
image: "redis:latest"
restart: always
command: ["redis-server", "--appendonly", "yes"]
volumes:
- "redis-data:/data"
ports:
- "6379:6379"
volweb-backend:
image: "forensicxlab/volweb-backend:latest"
container_name: volweb-backend
environment:
- DATABASE=${DATABASE}
- DATABASE_HOST=${DATABASE_HOST}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- DATABASE_PORT=${DATABASE_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- DJANGO_SECRET=${DJANGO_SECRET}
- BROKER_HOST=${BROKER_HOST}
- BROKER_PORT=${BROKER_PORT}
command: daphne -b 0.0.0.0 -p 8000 backend.asgi:application
ports:
- "8000:8000"
depends_on:
- volweb-postgresdb
- volweb-redis
restart: always
volumes:
- staticfiles:/home/app/web/staticfiles
- media:/home/app/web/media
volweb-workers:
image: "forensicxlab/volweb-backend:latest"
container_name: volweb-workers
environment:
- DATABASE=${DATABASE}
- DATABASE_HOST=${DATABASE_HOST}
- CSRF_TRUSTED_ORIGINS=${CSRF_TRUSTED_ORIGINS}
- DATABASE_PORT=${DATABASE_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- DJANGO_SECRET=${DJANGO_SECRET}
- BROKER_HOST=${BROKER_HOST}
- BROKER_PORT=${BROKER_PORT}
command: celery -A backend worker --loglevel=INFO
depends_on:
- volweb-redis
- volweb-postgresdb
restart: always
volumes:
- media:/home/app/web/media
deploy:
mode: replicated
replicas: 1
volweb-frontend:
image: "forensicxlab/volweb-frontend:latest"
container_name: volweb-frontend
expose:
- 3000
depends_on:
- volweb-backend
restart: always
volumes:
- staticfiles:/home/app/web/staticfiles
- media:/home/app/web/media
volweb-nginx:
container_name: volweb_nginx
image: nginx:mainline-alpine
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx:/etc/nginx/conf.d
- ./nginx/ssl/:/etc/nginx/certs/
depends_on:
- volweb-frontend
- volweb-backend
- volweb-workers
volumes:
postgres-data:
redis-data:
staticfiles:
media: