-
Notifications
You must be signed in to change notification settings - Fork 22
/
Copy pathdocker-compose.yml
102 lines (102 loc) · 2.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
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
services:
frontend:
hostname: frontend
environment:
NODE_ENV: production
REACT_APP_SERVER_URL: http://127.0.0.1:8080/api
build:
context: ./frontend
dockerfile: docker/Dockerfile.frontend
image: ibutsu/frontend
ports:
- "3000:8080"
depends_on:
backend:
condition: service_healthy
backend:
hostname: backend
environment:
JWT_SECRET: jwtsecret
APP_CONFIG: config.py
POSTGRESQL_HOST: postgres
POSTGRESQL_PORT: 5432
POSTGRESQL_DATABASE: ibutsu
POSTGRESQL_USER: ibutsu
POSTGRESQL_PASSWORD: ibutsu
CELERY_BROKER_URL: 'redis://redis'
CELERY_RESULT_BACKEND: 'redis://redis'
IBUTSU_SUPERADMIN_EMAIL: [email protected]
IBUTSU_SUPERADMIN_PASSWORD: admin12345
IBUTSU_SUPERADMIN_NAME: Administrator
build:
context: ./backend
dockerfile: docker/Dockerfile.backend
image: ibutsu/backend
ports:
- "8080:8080"
healthcheck:
test: curl --output /dev/null --silent --head --fail http://backend:8080/api/health
interval: 30s
timeout: 10s
retries: 5
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
postgres:
container_name: postgres
hostname: postgres
environment:
POSTGRES_USER: ibutsu
POSTGRES_PASSWORD: ibutsu
POSTGRES_DB: ibutsu
image: postgres:15
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U ibutsu" ]
interval: 5s
timeout: 5s
retries: 5
worker:
environment:
APP_SCRIPT: celery_worker.sh
POSTGRESQL_HOST: postgres
POSTGRESQL_DATABASE: ibutsu
POSTGRESQL_PORT: 5432
POSTGRESQL_USER: ibutsu
POSTGRESQL_PASSWORD: ibutsu
CELERY_BROKER_URL: 'redis://redis'
CELERY_RESULT_BACKEND: 'redis://redis'
build:
context: ./backend
dockerfile: docker/Dockerfile.worker
image: ibutsu/worker
depends_on:
backend:
condition: service_healthy
postgres:
condition: service_healthy
redis:
condition: service_started
scheduler:
build:
context: ./backend
dockerfile: docker/Dockerfile.scheduler
image: ibutsu/scheduler
environment:
POSTGRESQL_HOST: postgres
POSTGRESQL_DATABASE: ibutsu
POSTGRESQL_PORT: 5432
POSTGRESQL_USER: ibutsu
POSTGRESQL_PASSWORD: ibutsu
CELERY_BROKER_URL: 'redis://redis'
CELERY_RESULT_BACKEND: 'redis://redis'
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
backend:
condition: service_healthy
redis:
image: redis:latest