Example showing Caddy as a reverse proxy to a PDS, a site, and an app(view)
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

init commit

Alex McRoberts 73eb4e33

+104
+33
Caddyfile
··· 1 + { 2 + email info@yourapp.com 3 + on_demand_tls { 4 + ask http://127.0.0.1:3000/tls-check 5 + } 6 + } 7 + 8 + # Bluesky PDS - with on-demand TLS for user subdomains 9 + *.pds.yourapp.social, pds.yourapp.social { 10 + tls { 11 + on_demand 12 + } 13 + reverse_proxy http://127.0.0.1:3000 14 + } 15 + 16 + # API Server - automatic HTTPS 17 + appview.yourapp.com { 18 + reverse_proxy http://127.0.0.1:8080 19 + } 20 + 21 + # Main Site - automatic HTTPS 22 + yourapp.com { 23 + reverse_proxy http://127.0.0.1:8081 24 + } 25 + 26 + # Redirect www to non-www 27 + www.yourapp.com { 28 + redir https://yourapp.com{uri} permanent 29 + } 30 + 31 + 32 + 33 +
+71
docker-compose.yml
··· 1 + services: 2 + # The AppView server 3 + app: 4 + image: localhost/appview-server:latest 5 + container_name: appview-server 6 + pull_policy: never 7 + networks: 8 + - the-network 9 + environment: 10 + - ENVIRONMENT=development 11 + volumes: 12 + - ./server/data:/data 13 + restart: unless-stopped 14 + 15 + # The static landing page site 16 + site: 17 + build: 18 + context: ./landing-page-site 19 + dockerfile: Dockerfile 20 + container_name: landing-page-site 21 + networks: 22 + - the-network 23 + restart: unless-stopped 24 + 25 + # Bluesky PDS (Personal Data Server) 26 + pds: 27 + image: ghcr.io/bluesky-social/pds:latest 28 + container_name: pds 29 + networks: 30 + - the-network 31 + volumes: 32 + - pds-data:/pds 33 + env_file: 34 + - .env 35 + restart: unless-stopped 36 + 37 + # Reverse proxy - Caddy replaces nginx 38 + reverse-proxy: 39 + image: caddy:latest 40 + container_name: caddy 41 + ports: 42 + - "80:80" 43 + - "443:443" 44 + - "443:443/udp" # HTTP/3 support 45 + volumes: 46 + - ./Caddyfile:/etc/caddy/Caddyfile:ro 47 + - caddy-data:/data 48 + - caddy-config:/config 49 + networks: 50 + - the-network 51 + dns: 52 + - 127.0.0.11 # Docker's embedded DNS server 53 + depends_on: 54 + - app 55 + - site 56 + - pds 57 + restart: unless-stopped 58 + 59 + networks: 60 + the-network: 61 + driver: bridge 62 + driver_opts: 63 + com.docker.network.bridge.name: pds0 64 + ipam: 65 + config: 66 + - subnet: 172.20.0.0/16 67 + 68 + volumes: 69 + pds-data: 70 + caddy-data: 71 + caddy-config: