-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
41 lines (38 loc) · 989 Bytes
/
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
version: "3"
services:
db:
image: "postgres:15.4-alpine"
command: postgres -c 'max_connections=10000' -c 'wal_level=logical'
ports:
- "5432:5432"
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: demo
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 1s
timeout: 10s
retries: 30
volumes:
- db-data:/var/lib/postgresql/data
- ./migrations:/migrations
electric:
image: electricsql/electric:0.6.0
environment:
DATABASE_URL: "postgresql://postgres:postgres@db:5432/demo"
LOGICAL_PUBLISHER_HOST: "electric"
OFFSET_STORAGE_FILE: "/app/data/offset_storage.dat"
AUTH_MODE: "secure"
AUTH_JWT_ALG: "HS256"
AUTH_JWT_KEY: "11111111111111111111111111111111"
ports:
- "5050:5050"
- "5133:5133"
volumes:
- electric-data:/app/data
depends_on:
- db
volumes:
db-data:
electric-data: