- Dockerfile: bun build with Nitro node-server preset -> standalone Node runner - docker-compose.yml: Traefik labels for automatic HTTPS, runtime env from .env - .dockerignore + DEPLOY.md (Hostinger VPS: Docker + Dockge + Traefik steps) Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
37 lines
1.6 KiB
YAML
37 lines
1.6 KiB
YAML
# Deploy stack for Hostinger VPS (Docker + Dockge + Traefik).
|
|
# Dockge picks this up when the folder lives under /opt/stacks/.
|
|
#
|
|
# Before deploying, edit the 3 places marked <<< CHANGE >>> to match your
|
|
# Traefik install and your domain. See DEPLOY.md for how to find the right values.
|
|
|
|
services:
|
|
app:
|
|
build: .
|
|
image: info-share-spot:latest
|
|
container_name: info-share-spot
|
|
restart: unless-stopped
|
|
environment:
|
|
# SSR runtime vars (public-safe). Compose auto-substitutes these from the
|
|
# .env file sitting next to this compose file — no need to retype them.
|
|
SUPABASE_URL: ${SUPABASE_URL}
|
|
SUPABASE_PUBLISHABLE_KEY: ${SUPABASE_PUBLISHABLE_KEY}
|
|
# Only needed if you ever use the server-side admin (service-role) client.
|
|
# Keep this OUT of git — set it in Dockge's env editor instead.
|
|
# SUPABASE_SERVICE_ROLE_KEY: ${SUPABASE_SERVICE_ROLE_KEY}
|
|
HOST: 0.0.0.0
|
|
PORT: 3000
|
|
networks:
|
|
- traefik # <<< CHANGE >>> to your Traefik network name
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.docker.network=traefik # <<< CHANGE >>> same network name as above
|
|
- traefik.http.routers.infoshare.rule=Host(`app.example.com`) # <<< CHANGE >>> your domain
|
|
- traefik.http.routers.infoshare.entrypoints=websecure
|
|
- traefik.http.routers.infoshare.tls=true
|
|
- traefik.http.routers.infoshare.tls.certresolver=letsencrypt # <<< CHANGE >>> your resolver name
|
|
- traefik.http.services.infoshare.loadbalancer.server.port=3000
|
|
|
|
networks:
|
|
traefik:
|
|
external: true # Traefik already created this network
|