mirror of
https://github.com/Tony0410/nextstep.git
synced 2026-05-24 21:31:43 +08:00
- Fix argon2 native module build in Docker (add build-essential, python3) - Switch Docker base image from Alpine to Debian-slim for OpenSSL compatibility - Fix session cookies for HTTP access (COOKIE_SECURE env var) - Fix TypeScript type errors in sync routes and middleware - Fix CSS circular dependency in globals.css - Fix Map iteration in rate-limit cleanup - Add createdAt field to LocalNote interface - Configure Tailscale Funnel on port 10000 - Update NEXT_PUBLIC_APP_URL for public funnel access - Add initial Prisma migration Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
61 lines
1.6 KiB
YAML
61 lines
1.6 KiB
YAML
services:
|
|
app:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile
|
|
container_name: nextstep-app
|
|
restart: unless-stopped
|
|
ports:
|
|
- "4678:3000" # Bind to all interfaces for Tailscale access
|
|
environment:
|
|
- DATABASE_URL=postgresql://nextstep:${DB_PASSWORD:-nextstep}@db:5432/nextstep?schema=public
|
|
- NEXTAUTH_SECRET=${NEXTAUTH_SECRET}
|
|
- NEXT_PUBLIC_APP_URL=https://debianvm.kangaroo-eel.ts.net:10000
|
|
- TZ=Australia/Perth
|
|
- NODE_ENV=production
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
networks:
|
|
- nextstep-network
|
|
healthcheck:
|
|
test: ["CMD", "wget", "-qO-", "http://localhost:3000/api/health"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
|
|
db:
|
|
image: postgres:16-alpine
|
|
container_name: nextstep-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- POSTGRES_USER=nextstep
|
|
- POSTGRES_PASSWORD=${DB_PASSWORD:-nextstep}
|
|
- POSTGRES_DB=nextstep
|
|
- TZ=Australia/Perth
|
|
- PGTZ=Australia/Perth
|
|
volumes:
|
|
- postgres_data:/var/lib/postgresql/data
|
|
networks:
|
|
- nextstep-network
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U nextstep -d nextstep"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
start_period: 10s
|
|
# Do not expose PostgreSQL to the host - only accessible within the network
|
|
# If you need direct access for migrations, uncomment below:
|
|
# ports:
|
|
# - "127.0.0.1:5432:5432"
|
|
|
|
volumes:
|
|
postgres_data:
|
|
name: nextstep-postgres-data
|
|
|
|
networks:
|
|
nextstep-network:
|
|
name: nextstep-network
|
|
driver: bridge
|