-
Notifications
You must be signed in to change notification settings - Fork 70
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
48 lines (46 loc) · 1.55 KB
/
docker-compose.yaml
File metadata and controls
48 lines (46 loc) · 1.55 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
# Composed PowerSync Docker stack (generated by powersync docker configure).
# Modules add entries to include and to services.powersync.depends_on.
# Relative paths: . = powersync/docker, .. = powersync.
# Include syntax requires Docker Compose v2.20.3+
include:
[
modules/database-postgres/postgres.database.compose.yaml,
modules/storage-postgres/postgres.storage.compose.yaml
]
services:
powersync:
restart: unless-stopped
image: journeyapps/powersync-service:latest
command: [ 'start', '-r', 'unified' ]
env_file:
- .env
volumes:
- ../service.yaml:/config/service.yaml
- ../sync-config.yaml:/config/sync-config.yaml
environment:
POWERSYNC_CONFIG_PATH: /config/service.yaml
NODE_OPTIONS: --max-old-space-size=1000
healthcheck:
test:
- 'CMD'
- 'node'
- '-e'
- "fetch('http://localhost:${PS_PORT:-8080}/probes/liveness').then(r =>
r.ok ? process.exit(0) : process.exit(1)).catch(() =>
process.exit(1))"
interval: 5s
timeout: 1s
retries: 15
ports:
- '${PS_PORT:-8080}:${PS_PORT:-8080}'
# host.docker.internal resolves automatically on macOS/Windows; on Linux
# it needs this mapping so the container can reach the Next.js app running
# on the host (see client_auth.jwks_uri in ../service.yaml).
extra_hosts:
- 'host.docker.internal:host-gateway'
depends_on:
{
pg-db: { condition: service_healthy },
pg-storage: { condition: service_healthy }
}
name: powersync_example-nextjs