-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.yml
86 lines (82 loc) · 2.05 KB
/
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
version: '3.5'
services:
nfa_db:
image: timescale/timescaledb:2.11.0-pg15
container_name: nfa_db
command: postgres -c shared_preload_libraries=timescaledb
environment:
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- TIMESCALEDB_TELEMETRY=off
volumes:
- ./postgres/data:/var/lib/postgresql/data
ports:
- "5432:5432"
networks:
- nfa
restart: unless-stopped
nfa_api:
container_name: nfa_api
image: quay.io/vktrrdk/traceflow-api:${API_TAG}
# build:
# context: fastapi/
# dockerfile: Dockerfile
ports:
- "8000:80"
env_file:
- ./.env
environment:
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_PORT=${POSTGRES_PORT}
depends_on:
- nfa_db
command: bash -c "cd /app/alembic && alembic upgrade head && cd .. && uvicorn main:app --reload --host 0.0.0.0 --port 80"
restart: unless-stopped
volumes:
- ./config/alembic/alembic.ini:/app/alembic/alembic.ini
networks:
- nfa
redis:
image: redis:7.2.1
container_name: nfa_redis
ports:
- "6379:6379"
volumes:
- ./cache:/data
networks:
- nfa
redis_persist_worker:
image: quay.io/vktrrdk/traceflow-api:${API_TAG}
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
depends_on:
- redis
command: python start_worker.py
networks:
- nfa
environment:
- REDIS_HOST=nfa_redis
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=nfa_db
nfa_ui:
container_name: nfa_ui
image: quay.io/vktrrdk/traceflow-ui:${UI_TAG}
ports:
- "8001:8001"
networks:
- nfa
volumes:
- ./config/vite/vite.config.ts:/var/www/vite.config.ts
networks:
nfa:
name: nfa
driver: bridge