-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
120 lines (115 loc) · 2.63 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
118
119
120
secrets:
vran_db_password:
external: true
vran_db_user:
external: true
vran_db_name:
external: true
vran_django_key:
external: true
vran_redis_password:
external: true
vran_redis_conf:
external: true
volumes:
vran_db_volume:
vran_redis_volume:
services:
vran_ui:
build:
context: ./
dockerfile: container/ui_dockerfile
restart: unless-stopped
ports:
- 80:80
- 443:443
volumes:
- /srv/vran/ssl:/etc/ssl:ro
- /srv/vran/acme-challenge:/srv/acme-challenge
- /etc/localtime:/etc/localtime:ro
image: 127.0.0.1:5000/vran_ui
# command: [nginx-debug, '-g', 'daemon off;']
vran_queue_worker:
build:
context: ./
dockerfile: container/django_dockerfile
restart: unless-stopped
secrets:
- vran_django_key
- vran_db_name
- vran_db_user
- vran_db_password
- vran_redis_password
volumes:
- /etc/localtime:/etc/localtime:ro
- /srv/vran/contributions:/srv/vran/contributions
image: 127.0.0.1:5000/vran_django
command: [
"python",
"manage.py",
"rqworker",
"--with-scheduler"
]
vran_django:
build:
context: ./
dockerfile: container/django_dockerfile
restart: unless-stopped
ports:
- 8000:8000
expose:
- 8000
secrets:
- vran_django_key
- vran_db_name
- vran_db_user
- vran_db_password
- vran_redis_password
volumes:
- /srv/vran/contributions:/srv/vran/contributions
- /etc/localtime:/etc/localtime:ro
image: 127.0.0.1:5000/vran_django
# command: [
# 'gunicorn',
# 'django_project.asgi:application',
# '-k',
# 'uvicorn.workers.UvicornWorker',
# '-b 0.0.0.0:8000',
# '--log-level',
# 'debug'
# ]
vran_db:
container_name: vran_db
image: postgres:15.4
shm_size: 265m
restart: unless-stopped
ports:
- 127.0.0.1:5432:5432
expose:
- 5432
environment:
- POSTGRES_PASSWORD_FILE=/run/secrets/vran_db_password
- POSTGRES_USER_FILE=/run/secrets/vran_db_user
- POSTGRES_DB_FILE=/run/secrets/vran_db_name
secrets:
- vran_db_password
- vran_db_user
- vran_db_name
volumes:
- vran_db_volume:/var/lib/postgresql/data
- /etc/localtime:/etc/localtime:ro
vran_redis:
container_name: vran_redis
image: redis:7.0-alpine
expose:
- 6379
volumes:
- vran_redis_volume:/data
- /etc/localtime:/etc/localtime:ro
secrets:
- vran_redis_conf
command: [
"redis-server",
"/var/run/secrets/vran_redis_conf"
]
restart: unless-stopped