forked from proompteng/bilig
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
103 lines (100 loc) · 2.75 KB
/
Copy pathcompose.yaml
File metadata and controls
103 lines (100 loc) · 2.75 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
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
103
services:
postgres:
image: postgres:17
command:
- postgres
- -c
- wal_level=logical
- -c
- max_replication_slots=10
- -c
- max_wal_senders=10
environment:
POSTGRES_DB: bilig
POSTGRES_USER: bilig
POSTGRES_PASSWORD: bilig
healthcheck:
test:
- CMD-SHELL
- pg_isready -U bilig -d bilig
interval: 5s
timeout: 5s
retries: 20
start_period: 5s
ports:
- "${BILIG_E2E_POSTGRES_PORT:-5432}:5432"
volumes:
- postgres-data:/var/lib/postgresql/data
bilig-app:
build:
context: .
target: bilig-runtime
depends_on:
postgres:
condition: service_healthy
environment:
HOST: 0.0.0.0
PORT: "4321"
DATABASE_URL: postgresql://bilig:bilig@postgres:5432/bilig
BILIG_RUN_DATA_MIGRATIONS_ON_BOOT: "true"
BILIG_PUBLIC_SERVER_URL: http://127.0.0.1:${BILIG_E2E_WEB_PORT:-3000}
BILIG_WEB_APP_BASE_URL: http://127.0.0.1:${BILIG_E2E_WEB_PORT:-3000}
BILIG_CORS_ORIGIN: http://127.0.0.1:${BILIG_E2E_WEB_PORT:-3000}
BILIG_ZERO_CACHE_URL: /zero
BILIG_ZERO_PROXY_UPSTREAM: http://zero-cache:4848
BILIG_DEFAULT_DOCUMENT_ID: bilig-demo
BILIG_PERSIST_STATE: "true"
networks:
default:
aliases:
- bilig-app
healthcheck:
test:
- CMD
- node
- -e
- fetch("http://127.0.0.1:4321/healthz").then((response) => { if (!response.ok) process.exit(1); }).catch(() => process.exit(1))
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
ports:
- "${BILIG_E2E_SYNC_SERVER_PORT:-4321}:4321"
- "${BILIG_E2E_WEB_PORT:-3000}:4321"
zero-cache:
image: rocicorp/zero:1.1.1
depends_on:
postgres:
condition: service_healthy
bilig-app:
condition: service_healthy
healthcheck:
test:
- CMD-SHELL
- curl -f http://localhost:4848/keepalive
interval: 5s
timeout: 5s
retries: 20
start_period: 10s
environment:
ZERO_PORT: "4848"
ZERO_REPLICA_FILE: /data/zero.db
ZERO_ADMIN_PASSWORD: local-zero-admin
ZERO_APP_ID: bilig_v2
ZERO_APP_PUBLICATIONS: zero_data_v2
ZERO_UPSTREAM_DB: postgresql://bilig:bilig@postgres:5432/bilig
ZERO_CVR_DB: postgresql://bilig:bilig@postgres:5432/bilig
ZERO_CHANGE_DB: postgresql://bilig:bilig@postgres:5432/bilig
ZERO_QUERY_URL: http://bilig-app:4321/api/zero/v2/query
ZERO_MUTATE_URL: http://bilig-app:4321/api/zero/v2/mutate
networks:
default:
aliases:
- bilig-zero
ports:
- "${BILIG_E2E_ZERO_PORT:-4848}:4848"
volumes:
- zero-replica-data:/data
volumes:
postgres-data:
zero-replica-data: