Initial scaffold: push-to-deploy + auth-proxy + public-switch template

This commit is contained in:
Lumen
2026-06-22 11:33:43 +02:00
commit e031064dcf
7 changed files with 498 additions and 0 deletions
+50
View File
@@ -0,0 +1,50 @@
# Base compose — defines the three services. The TrueNAS override
# (docker-compose.truenas.yml) layers homelab port/secret specifics on top.
#
# Replace __PROJECT__ before first push (container names + db credentials).
# This base is intentionally LAN/dev-shaped; the override hardens it for TrueNAS.
services:
db:
image: postgres:16-alpine
container_name: __PROJECT__-db
environment:
POSTGRES_USER: __PROJECT__
POSTGRES_DB: __PROJECT__
POSTGRES_PASSWORD: __PROJECT___dev
volumes:
- pgdata:/var/lib/postgresql/data
# In dev you may publish 5432; the TrueNAS override drops it (internal-only).
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U __PROJECT__"]
interval: 10s
timeout: 5s
retries: 5
backend:
build: ./backend
container_name: __PROJECT__-backend
depends_on:
db:
condition: service_healthy
environment:
SPRING_DATASOURCE_URL: jdbc:postgresql://db:5432/__PROJECT__
SPRING_DATASOURCE_USERNAME: __PROJECT__
SPRING_DATASOURCE_PASSWORD: __PROJECT___dev
ports:
- "8080:8080"
frontend:
build: ./frontend
container_name: __PROJECT__-frontend
depends_on:
- backend
environment:
BACKEND_URL: http://backend:8080
ports:
- "3000:3000"
volumes:
pgdata:
name: __PROJECT___pgdata