-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (47 loc) · 1.4 KB
/
docker-compose.yml
File metadata and controls
49 lines (47 loc) · 1.4 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
services:
postgres:
image: postgres:16
restart: unless-stopped
command: ["postgres", "-c", "wal_level=logical"]
environment:
POSTGRES_DB: ${POSTGRES_DB}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_PORT}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
- ./postgres/init:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 20
powersync:
image: journeyapps/powersync-service:latest
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
env_file:
- .env
environment:
POWERSYNC_CONFIG_PATH: /config/service.yaml
NODE_OPTIONS: --max-old-space-size=1000
volumes:
- ./powersync/service.yaml:/config/service.yaml:ro
- ./powersync/sync-config.yaml:/config/sync-config.yaml:ro
ports:
- "${PS_PORT}:${PS_PORT}"
- "${PS_TELEMETRY_PORT}:${PS_TELEMETRY_PORT}"
healthcheck:
test:
- "CMD"
- "node"
- "-e"
- "fetch('http://localhost:' + (process.env.PS_PORT || '8080') + '/probes/liveness').then(r => r.ok ? process.exit(0) : process.exit(1)).catch(() => process.exit(1))"
interval: 5s
timeout: 3s
retries: 20
volumes:
postgres_data: