-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathdocker-compose.yml
74 lines (63 loc) · 1.66 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
version: "3.7"
x-tifa-common:
&tifa-common
image: tifa:local
volumes:
- .:/opt/tifa
environment:
&tifa-common-env
SECRET_KEY: "ZF8dr8z@L*asd3oR?R/pe1}|l12enem(ppFV=U<!F@lF-k9wE"
APP_SETTINGS: "/opt/freyja/settings.env.docker"
depends_on:
- postgres
- redis
services:
postgres:
image: postgres:13
restart: always
environment:
- DATABASE_HOST=127.0.0.1
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=postgres
volumes:
- ./compose/postgres/docker_postgres_init.sql:/docker-entrypoint-initdb.d/docker_postgres_init.sql
- ./.volume/postgres-data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:latest
healthcheck:
test: [ "CMD", "redis-cli", "ping" ]
interval: 5s
timeout: 30s
retries: 50
restart: always
tifa-web:
<<: *tifa-common
command: uvicorn --host 0.0.0.0 --port 8000 --reload tifa.asgi:application
ports:
- "8000:8000"
tifa-toolbox:
<<: *tifa-common
command: [ "tifa-cli" ]
tifa-toolbox-test:
<<: *tifa-common
environment:
SETTING_PATH: "/opt/tifa/settings_docker_test.py"
command: [ "tifa-cli" ]
tifa-worker:
<<: *tifa-common
command: bash -c "celery -A tifa.worker.celery worker -l INFO"
tifa-beat:
<<: *tifa-common
command: bash -c "celery -A tifa.worker.celery worker -B -n beat_worker -l INFO"
tifa-flower:
<<: *tifa-common
command: [ "tifa-cli", "worker", "monitor" ]
volumes:
postgres_data_dev: { }
postgres_backup_dev: { }