Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

docker-compose.yml

35 lines850 Bytes

1version: '3.8'
2services:
3 postgres:
4 image: postgres:17-alpine
5 environment:
6 POSTGRES_DB: shopping_list
7 POSTGRES_USER: postgres
8 POSTGRES_PASSWORD: postgres
9 ports:
10 - '54322:5432'
11 volumes:
12 - ./postgres.conf:/etc/postgresql/postgresql.conf:ro
13 tmpfs:
14 - /var/lib/postgresql/data
15 - /tmp
16 command:
17 - postgres
18 - -c
19 - config_file=/etc/postgresql/postgresql.conf
20 healthcheck:
21 test: ['CMD-SHELL', 'pg_isready -U postgres']
22 interval: 5s
23 timeout: 5s
24 retries: 5
25​
26 electric:
27 image: electricsql/electric:canary
28 environment:
29 DATABASE_URL: postgresql://postgres:postgres@postgres:5432/shopping_list?sslmode=disable
30 ELECTRIC_INSECURE: true
31 ports:
32 - '3003:3000'
33 depends_on:
34 postgres:
35 condition: service_healthy