2026-06-13 10:15:23 +08:00
|
|
|
# Dev infrastructure only. App runs via `pnpm dev` on the host.
|
|
|
|
|
# Usage: docker compose -f docker-compose.dev.yml up -d
|
|
|
|
|
name: snapotter-dev
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
2026-07-27 15:37:30 +08:00
|
|
|
image: postgres:17-alpine@sha256:742f40ea20b9ff2ff31db5458d127452988a2164df9e17441e191f3b72252193
|
2026-06-13 10:15:23 +08:00
|
|
|
container_name: snapotter-dev-postgres
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_USER: snapotter
|
|
|
|
|
POSTGRES_PASSWORD: snapotter
|
|
|
|
|
POSTGRES_DB: snapotter
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
volumes:
|
|
|
|
|
- snapotter-dev-pgdata:/var/lib/postgresql/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U snapotter -d snapotter"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 10
|
|
|
|
|
start_period: 10s
|
|
|
|
|
|
|
|
|
|
redis:
|
2026-07-27 15:37:30 +08:00
|
|
|
image: redis:8-alpine@sha256:9d317178eceac8454a2284a9e6df2466b93c745529947f0cd42a0fa9609d7005
|
2026-06-13 10:15:23 +08:00
|
|
|
container_name: snapotter-dev-redis
|
|
|
|
|
restart: unless-stopped
|
|
|
|
|
command: ["redis-server", "--maxmemory-policy", "noeviction", "--appendonly", "yes"]
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
|
|
|
|
volumes:
|
|
|
|
|
- snapotter-dev-redisdata:/data
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 10
|
|
|
|
|
start_period: 10s
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
snapotter-dev-pgdata:
|
|
|
|
|
snapotter-dev-redisdata:
|