-
Notifications
You must be signed in to change notification settings - Fork 22
/
docker-compose.dev.yml
100 lines (97 loc) · 2.53 KB
/
docker-compose.dev.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
services:
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
redis:
image: redis:latest
backend:
environment:
- JWT_SECRET=jwtsecret
- POSTGRESQL_HOST=postgres
- POSTGRESQL_PORT=5432
- POSTGRESQL_DATABASE=ibutsu
- POSTGRESQL_USER=ibutsu
- POSTGRESQL_PASSWORD=ibutsu
- CELERY_BROKER_URL=redis://redis:6379
- CELERY_RESULT_BACKEND=redis://redis:6379
- IBUTSU_SUPERADMIN_EMAIL=admin@example.com
- IBUTSU_SUPERADMIN_PASSWORD=admin12345
- IBUTSU_SUPERADMIN_NAME=Administrator
- HOME=/mnt
image: registry.access.redhat.com/ubi8/python-39
command: >
/bin/bash -c
"pip install -U pip setuptools wheel &&
pip install . &&
python -m ibutsu_server --host 0.0.0.0"
working_dir: /mnt
volumes:
- "./backend:/mnt:z"
user: ${UID:-1000}
ports:
- "8080:8080"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
healthcheck:
test: curl --output /dev/null --silent --head --fail http://127.0.0.1:8080/api/health
interval: 10s
timeout: 10s
retries: 5
worker:
environment:
- COLUMNS=80
- POSTGRESQL_HOST=postgres
- POSTGRESQL_PORT=5432
- POSTGRESQL_DATABASE=ibutsu
- POSTGRESQL_USER=ibutsu
- POSTGRESQL_PASSWORD=ibutsu
- CELERY_BROKER_URL=redis://redis:6379
- CELERY_RESULT_BACKEND=redis://redis:6379
- HOME=/mnt
image: registry.access.redhat.com/ubi8/python-39
command: >
/bin/bash -c
"pip install -U pip setuptools wheel &&
pip install . &&
./celery_worker.sh"
working_dir: /mnt
volumes:
- "./backend:/mnt:z"
user: ${UID:-1000}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
backend:
condition: service_healthy
frontend:
environment:
NODE_ENV: production
REACT_APP_SERVER_URL: http://127.0.0.1:8080/api
image: node:18
command: >
/bin/bash -c
"npm install --no-save --no-package-lock yarn &&
yarn install &&
yarn run devserver"
working_dir: /mnt
user: "0"
volumes:
- "./frontend:/mnt:z"
ports:
- "3000:3000"
depends_on:
backend:
condition: service_healthy