-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-gunicorn.yml
57 lines (44 loc) · 1.08 KB
/
docker-compose-gunicorn.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
version: '1.0'
services:
db:
container_name: HIRIS-DB
image: postgres:15.3-bullseye
# Set shared memory size
shm_size: 1g
#ports:
#- "${POSTGRES_PORT}:5432"
volumes:
- ./postgresql.conf:/config/postgresql.conf
- hiris-db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 5s
retries: 5
env_file:
- .env
command: postgres -c config_file='/config/postgresql.conf'
hiris:
container_name: HIRIS
build: .
command:
- /bin/bash
- -c
- |
cron
crontab /hiris/crontab_import_heartbeat
python manage.py collectstatic --noinput
gunicorn -w 2 -b 0.0.0.0:${WEB_PORT} hiris.wsgi:application
# command: python /hiris/manage.py runserver 0.0.0.0:${WEB_PORT}
volumes:
- .:/hiris
- hiris-file-storage:/${WORKING_FILES_DIR}
ports:
- "${WEB_PORT}:${WEB_PORT}"
depends_on:
- db
env_file:
- .env
volumes:
hiris-db-data:
hiris-file-storage: