Files
com.gregkilmer.www/docker-compose.yml
T

49 lines
1.6 KiB
YAML

# =============================================================================
# docker-compose.yml — Greg Kilmer Profile Site (Cosmos homelab)
# =============================================================================
# Builds and runs the site as a container behind your Cosmos reverse proxy.
#
# Usage:
# 1. Copy .env.example -> .env and fill in SMTP/contact vars.
# 2. `docker compose up -d --build`
# 3. Point your Cosmos reverse proxy (Traefik/Caddy/nginx) at this service on
# port 4321, with TLS for gregkilmer.com.
#
# See docs/DEPLOYMENT.md for the full walkthrough.
# =============================================================================
services:
greg-site:
container_name: greg-profile-site
build:
context: .
dockerfile: Dockerfile
args:
# Canonical URL baked in at build time for metadata.
SITE_URL: ${SITE_URL:-https://gregkilmer.com}
image: greg-profile-site:latest
restart: unless-stopped
ports:
# Map container 4321 -> host. If Cosmos reverse-proxies, you can instead
# use `expose:` and join a shared network. Adjust to your setup.
- "${HOST_PORT:-4321}:4321"
env_file:
- .env
environment:
- HOST=0.0.0.0
- PORT=4321
- SITE_URL=${SITE_URL:-https://gregkilmer.com}
healthcheck:
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:4321/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 15s
networks:
- homelab_network
networks:
homelab_network:
name: homelab_network
external: true