Phase 0 + 1: Dockerized Supabase core + attendee PWA
Phase 0 — Supabase core (Docker via CLI): - Schema: profiles, slots, sessions, preferences, connections, checkins, feedback, leaderboard (Realtime mirror), points_log - RLS on every table; transactional security-definer points RPCs - Seed: 6 slots, 18 sessions, 13 demo users (QR token as auth password) Phase 1 — Attendee web PWA (React + Vite + TS): - Login via QR token + email (GoTrue, no email sent) - Home, Agenda, Scan/Connect, staff Check-in, Feedback, live Leaderboard, Profile - Same-origin proxy to Supabase (Vite dev / nginx in Docker) - Docker: multi-stage build -> nginx sidecar on the Supabase network Co-authored-by: Stephan Charles <[email protected]> Co-authored-by: Amelia Hernandez <[email protected]> Co-authored-by: Markus Franz <[email protected]> Co-authored-by: Sabrina Hota <[email protected]> Co-authored-by: Nilüfer Doğan <[email protected]>
This commit is contained in:
commit
63aa4ecfc8
45 files changed
+6922
No files matched your search
@@ -0,0 +1,57 @@
|
||||
# Convivo — application services (Docker Compose).
|
||||
#
|
||||
# The Supabase CORE (Postgres, GoTrue, PostgREST, Realtime, Kong, Studio, ...)
|
||||
# is managed by the Supabase CLI, not by this file. Start it first:
|
||||
#
|
||||
# npm run db:start # = supabase start
|
||||
#
|
||||
# The CLI creates an external Docker network named after the project
|
||||
# (supabase_network_<project_id>; here: supabase_network_Convivo) and a Kong
|
||||
# container (supabase_kong_Convivo) that fronts the API on port 54321.
|
||||
#
|
||||
# This compose file runs the attendee app as a sidecar that JOINS that network
|
||||
# and proxies the Supabase same-origin paths to the Kong container.
|
||||
#
|
||||
# 1. npm run db:start # start the Supabase core (CLI)
|
||||
# 2. docker compose up --build # build + run the app on :3000
|
||||
#
|
||||
# Then open http://localhost:3000 and log in with a demo QR code
|
||||
# (e.g. CVV-ANA-4821 / [email protected]).
|
||||
|
||||
name: convivo
|
||||
|
||||
services:
|
||||
convivo-app:
|
||||
build:
|
||||
context: ./apps/convivo
|
||||
args:
|
||||
# Standard local Supabase anon key (not a secret). Override if needed.
|
||||
VITE_SUPABASE_ANON_KEY: ${VITE_SUPABASE_ANON_KEY:-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0}
|
||||
image: convivo-app:latest
|
||||
container_name: convivo-app
|
||||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
# Where nginx proxies the Supabase paths. Default: the Kong container on
|
||||
# the shared Supabase network. NOTE: Kong listens on 8000 INSIDE the
|
||||
# container (the 54321->8000 mapping is host-only), so use port 8000 here.
|
||||
# If you run the core on the host instead of the shared network, set this
|
||||
# to host.docker.internal:54321.
|
||||
SUPABASE_PROXY_TARGET: ${SUPABASE_PROXY_TARGET:-supabase_kong_Convivo:8000}
|
||||
# Join the network the Supabase CLI created for the core.
|
||||
networks:
|
||||
- supabase
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3000/"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
networks:
|
||||
supabase:
|
||||
# External network created by `supabase start`. Name = supabase_network_<project_id>.
|
||||
# If you change project_id in supabase/config.toml, update this name too.
|
||||
external: true
|
||||
name: ${SUPABASE_NETWORK:-supabase_network_Convivo}
|
||||
Reference in new issue
Block a user