Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (66 loc) · 1.97 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (66 loc) · 1.97 KB
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
version: '3.7'
services:
api:
build:
context: .
dockerfile: Dockerfiles/DockerfileApi
container_name: api
# restart: unless-stopped
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
command: gunicorn --conf api/gunicorn_conf.py -b 0.0.0.0:8080 -k uvicorn.workers.UvicornWorker api.main:app
redis:
image: redis
container_name: redis
restart: always
volumes:
- ./redis/data:/data
- ./redis/redis.conf:/redis/redis.conf
expose:
- "6379"
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 10s
timeout: 3s
retries: 5
start_period: 1s
command: redis-server /redis/redis.conf
postgres:
image: postgres:16
container_name: postgres
environment:
POSTGRES_USER: people_safety
POSTGRES_PASSWORD: people_safety
POSTGRES_DB: people_safety
volumes:
- ./postgres:/var/lib/postgresql/data
healthcheck:
test: [ "CMD", "pg_isready", "-U", "people_safety" ]
interval: 10s
timeout: 4s
retries: 5
start_period: 1s
restart: always
worker:
build:
context: .
dockerfile: Dockerfiles/DockerfileWorker
container_name: worker
# restart: unless-stopped
command: arq worker.config.WorkerSettings.WorkerSettings
depends_on:
redis:
condition: service_healthy
streamlit:
build:
context: .
dockerfile: Dockerfiles/DockerfileStreamlit
container_name: streamlit
ports:
- "8501:8501"
command: streamlit run stramlit/main.py --client.showErrorDetails=false