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

docker-compose.yml

47 lines1.1 KB

1version: '3.8'
2services:
3 postgres:
4 image: postgres:17-alpine
5 environment:
6 POSTGRES_DB: todo_app
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/todo_app?sslmode=disable
30 ELECTRIC_INSECURE: true
31 ports:
32 - 3003:3000
33 depends_on:
34 postgres:
35 condition: service_healthy
36​
37 trailbase:
38 image: trailbase/trailbase:latest
39 ports:
40 - '${PORT:-4000}:4000'
41 restart: unless-stopped
42 volumes:
43 - ./traildepot:/app/traildepot
44 command: '/app/trail --data-dir /app/traildepot run --address 0.0.0.0:4000 --dev'
45​
46volumes:
47 postgres_data: