Wire compose to VPS Traefik (host-mode, wildcard hostname, HTTPS)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+10
-16
@@ -1,8 +1,9 @@
|
||||
# Deploy stack for Hostinger VPS (Docker + Dockge + Traefik).
|
||||
# Dockge picks this up when the folder lives under /opt/stacks/.
|
||||
# Deploy stack for the Hostinger VPS (Docker + Dockge + Traefik).
|
||||
# Lives in Dockge's stacks dir (/docker/info-share-spot) so Dockge manages it.
|
||||
#
|
||||
# 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.
|
||||
# Traefik on this VPS runs in host-network mode with the Docker provider, so the
|
||||
# app just needs traefik.enable + a router; no shared "traefik" network is needed.
|
||||
# It's served at the VPS wildcard hostname with automatic Let's Encrypt HTTPS.
|
||||
|
||||
services:
|
||||
app:
|
||||
@@ -11,26 +12,19 @@ services:
|
||||
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.
|
||||
# SSR runtime vars (public-safe). Compose substitutes these from the .env
|
||||
# file next to this compose file.
|
||||
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.
|
||||
# Set it in Dockge's env editor, never commit it:
|
||||
# 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.rule=Host(`info-share-spot.srv1720881.hstgr.cloud`)
|
||||
- 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.routers.infoshare.tls.certresolver=letsencrypt
|
||||
- traefik.http.services.infoshare.loadbalancer.server.port=3000
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true # Traefik already created this network
|
||||
|
||||
Reference in New Issue
Block a user