-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
58 lines (55 loc) · 2.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
58 lines (55 loc) · 2.84 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
# RePro + self-hosted Supabase (Postgres, Auth, REST, Realtime, Storage, Studio).
# Vendored stack: docker/supabase/compose.yaml (from github.com/supabase/supabase docker).
#
# docker compose up --build
#
# App: http://localhost:3000 · API: http://localhost:4000
# Supabase API + Studio (basic auth: DASHBOARD_USERNAME / DASHBOARD_PASSWORD): SUPABASE_PUBLIC_URL (default http://localhost:54321)
# Postgres from host (pooler): localhost:54322
#
# Requires a populated repo-root `.env` (Compose reads it for ${VAR} substitution in all services).
# First time: `cp .env.example .env` or run `pnpm docker:up` / `./scripts/ensure-compose-env.sh up --build`.
# After switching from the old `postgres` service: `docker compose down --remove-orphans`.
#
name: repro
include:
- docker/supabase/compose.yaml
services:
backend:
build:
context: .
dockerfile: services/backend/Dockerfile
restart: unless-stopped
extra_hosts:
- "host.docker.internal:host-gateway"
ports:
- "${BACKEND_PORT:-4000}:4000"
depends_on:
db:
condition: service_healthy
kong:
condition: service_healthy
environment:
PORT: "4000"
DATABASE_URL: ${COMPOSE_PRISMA_DATABASE_URL:-postgresql://postgres:${POSTGRES_PASSWORD:-your-super-secret-and-long-postgres-password}@db:${POSTGRES_PORT:-5432}/postgres?schema=public}
DIRECT_URL: ${COMPOSE_PRISMA_DIRECT_URL:-postgresql://postgres:${POSTGRES_PASSWORD:-your-super-secret-and-long-postgres-password}@db:${POSTGRES_PORT:-5432}/postgres?schema=public}
SUPABASE_URL: http://kong:8000
SUPABASE_ANON_KEY: "${ANON_KEY:-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE}"
SUPABASE_SERVICE_ROLE_KEY: "${SERVICE_ROLE_KEY:-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJzZXJ2aWNlX3JvbGUiLAogICAgImlzcyI6ICJzdXBhYmFzZS1kZW1vIiwKICAgICJpYXQiOiAxNjQxNzY5MjAwLAogICAgImV4cCI6IDE3OTk1MzU2MDAKfQ.DaYlNEoUrrEn2Ig7tqibS-PHK5vgusbcbo7X36XVt4Q}"
PLATFORM_ADMIN_EMAILS: ${PLATFORM_ADMIN_EMAILS:-admin@example.com}
frontend:
build:
context: .
dockerfile: services/frontend/Dockerfile
args:
NEXT_PUBLIC_SUPABASE_URL: ${SUPABASE_PUBLIC_URL:-http://localhost:54321}
NEXT_PUBLIC_SUPABASE_ANON_KEY: "${ANON_KEY:-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyAgCiAgICAicm9sZSI6ICJhbm9uIiwKICAgICJpc3MiOiAic3VwYWJhc2UtZGVtbyIsCiAgICAiaWF0IjogMTY0MTc2OTIwMCwKICAgICJleHAiOiAxNzk5NTM1NjAwCn0.dc_X5iR_VP_qT0zsiyj_I_OZ2T9FtRU2BBNWN8Bu4GE}"
NEXT_PUBLIC_API_URL: ${NEXT_PUBLIC_API_URL:-http://localhost:4000}
restart: unless-stopped
ports:
- "${FRONTEND_PORT:-3000}:3000"
depends_on:
backend:
condition: service_started
environment:
PORT: "3000"