Skip to content

Instantly share code, notes, and snippets.

@felddy
Last active August 28, 2020 12:04
Show Gist options
  • Save felddy/d787ee74c7db435932cb4e6bb1250be2 to your computer and use it in GitHub Desktop.
Save felddy/d787ee74c7db435932cb4e6bb1250be2 to your computer and use it in GitHub Desktop.
Example of running FoundryVTT behind Caddy.
{$SITE_ADDRESS} {
reverse_proxy foundry:30000
tls {$LETSENCRYPT_EMAIL} {
# Comment out next line to use production CA
ca https://acme-staging-v02.api.letsencrypt.org/directory
}
}
version: "3.8"
services:
caddy:
image: caddy:2-alpine
volumes:
- type: bind
source: ./Caddyfile
target: /etc/caddy/Caddyfile
- type: bind
source: ./volumes/caddy_data
target: /data
- type: bind
source: ./volumes/caddy_config
target: /config
environment:
- LETSENCRYPT_EMAIL=your_email@example.com
- SITE_ADDRESS=vtt.example.com
ports:
- target: "443"
published: "443"
protocol: tcp
- target: "80"
published: "80"
protocol: tcp
foundry:
image: felddy/foundryvtt:release
hostname: my_foundry_host
init: true
restart: "unless-stopped"
volumes:
- type: bind
source: ./volumes/foundry_data
target: /data
environment:
- CONTAINER_CACHE=/data/container_cache
- CONTAINER_VERBOSE=true
- FOUNDRY_PASSWORD=<password>
- FOUNDRY_USERNAME=<username>
- FOUNDRY_ADMIN_KEY=atropos
- FOUNDRY_PROXY_SSL=true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment