-
Notifications
You must be signed in to change notification settings - Fork 177
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
70 lines (65 loc) · 2.11 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
70 lines (65 loc) · 2.11 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Local dev services for petdex contributors. Engine-agnostic, works
# with both `docker compose` and `podman compose`. Brings up the
# minimum stack the app needs: Postgres + Redis. Everything else
# (Clerk, R2, Resend) is either a shared OSS dev instance or a no-op
# fallback in development.
#
# Usage:
# bun run dev:docker
#
# That script probes for the available container engine, boots this
# compose file, runs drizzle-kit push, seeds, and starts next dev.
name: petdex-dev
services:
postgres:
image: postgres:16-alpine
container_name: petdex-postgres
restart: unless-stopped
environment:
POSTGRES_USER: petdex
POSTGRES_PASSWORD: petdex
POSTGRES_DB: petdex
# The pgvector extension is only used by the optional similarity
# path (admin queue + vibe search). The image ships without it,
# so the schema migrations skip the index in dev and the dev
# build short-circuits when no embeddings are present.
ports:
- "127.0.0.1:54320:5432"
volumes:
- petdex-postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U petdex -d petdex"]
interval: 2s
timeout: 3s
retries: 30
redis:
image: redis:7-alpine
container_name: petdex-redis
restart: unless-stopped
command: ["redis-server", "--save", "", "--appendonly", "no"]
ports:
- "127.0.0.1:63790:6379"
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 2s
timeout: 3s
retries: 30
# Upstash provides @upstash/redis as a REST client. Local Redis is a
# plain TCP server. srh (serverless-redis-http) exposes a Redis
# backend over the same REST protocol Upstash speaks, so the app's
# Redis.fromEnv() works unchanged in dev.
redis-rest:
image: hiett/serverless-redis-http:latest
container_name: petdex-redis-rest
restart: unless-stopped
environment:
SRH_MODE: env
SRH_TOKEN: petdex-dev-token
SRH_CONNECTION_STRING: redis://redis:6379
depends_on:
redis:
condition: service_healthy
ports:
- "127.0.0.1:8079:80"
volumes:
petdex-postgres-data: