Files
sexy/compose.yml
Sebastian Krüger f880aa5957 feat: externalize buttplug as separate nginx container
- Add Dockerfile.buttplug: builds Rust/WASM + TS, serves via nginx
- Add nginx.buttplug.conf: serves /dist and /wasm with correct MIME types
- Add .gitea/workflows/docker-build-buttplug.yml: path-filtered CI workflow
- Strip Rust toolchain and buttplug build from frontend Dockerfile
- Move buttplug to devDependencies (types only at build time)
- Remove vite-plugin-wasm from frontend (WASM now served by nginx)
- Add /buttplug proxy in vite.config (dev: localhost:8080)
- Add buttplug service to compose.yml
- Load buttplug dynamically in play page via runtime import
- Fix faq page: suppress no-unnecessary-state-wrap for reassigned SvelteSet

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-08 13:49:38 +01:00

110 lines
2.6 KiB
YAML

name: sexy
services:
postgres:
image: postgres:16-alpine
container_name: sexy_postgres
restart: unless-stopped
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: sexy
POSTGRES_USER: sexy
POSTGRES_PASSWORD: sexy
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sexy"]
interval: 10s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
container_name: sexy_redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis_data:/data
command: redis-server --appendonly yes
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
backend:
build:
context: .
dockerfile: Dockerfile.backend
container_name: sexy_backend
restart: unless-stopped
ports:
- "4000:4000"
volumes:
- uploads_data:/data/uploads
environment:
DATABASE_URL: postgresql://sexy:sexy@sexy_postgres:5432/sexy
REDIS_URL: redis://sexy_redis:6379
UPLOAD_DIR: /data/uploads
CORS_ORIGIN: http://localhost:3000
PORT: 4000
NODE_ENV: production
COOKIE_SECRET: change-me-in-production
SMTP_HOST: localhost
SMTP_PORT: 587
EMAIL_FROM: noreply@sexy.pivoine.art
PUBLIC_URL: http://localhost:3000
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
healthcheck:
test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:4000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
buttplug:
build:
context: .
dockerfile: Dockerfile.buttplug
container_name: sexy_buttplug
restart: unless-stopped
ports:
- "8080:80"
healthcheck:
test:
["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost/dist/index.js"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
frontend:
build:
context: .
dockerfile: Dockerfile
container_name: sexy_frontend
restart: unless-stopped
ports:
- "3000:3000"
environment:
NODE_ENV: production
PORT: 3000
HOST: 0.0.0.0
PUBLIC_API_URL: http://sexy_backend:4000
PUBLIC_URL: http://localhost:3000
BUTTPLUG_URL: http://sexy_buttplug:80
depends_on:
backend:
condition: service_healthy
buttplug:
condition: service_healthy
volumes:
uploads_data:
driver: local
postgres_data:
driver: local
redis_data:
driver: local