services: # nginx terminates TLS and forwards to the API gateway (api-gw) on port 8000, # so the gateway's own host port binding is removed here. This works for # either gateway, since the service is named api-gw in both cases. api-gw: ports: !reset [] # When using the Kong override, uncomment the following: #environment: # KONG_PORT_MAPS: "443:8000,443:8443" nginx: container_name: supabase-nginx image: jonasal/nginx-certbot:6.2.0-nginx1.31.3 restart: unless-stopped ports: - "80:80" - "443:443" depends_on: api-gw: condition: service_healthy studio: condition: service_healthy environment: PROXY_DOMAIN: ${PROXY_DOMAIN} CERTBOT_EMAIL: ${CERTBOT_EMAIL} PROXY_AUTH_USERNAME: ${DASHBOARD_USERNAME} PROXY_AUTH_PASSWORD: ${DASHBOARD_PASSWORD} command: - /bin/bash - -c - | printf '%s:%s\n' "$${PROXY_AUTH_USERNAME}" "$$(openssl passwd -apr1 "$${PROXY_AUTH_PASSWORD}")" > /etc/nginx/user_conf.d/dashboard-passwd && \ envsubst '$${PROXY_DOMAIN}' < /etc/nginx/supabase-nginx.conf.tpl > /etc/nginx/user_conf.d/nginx.conf && \ /scripts/start_nginx_certbot.sh volumes: - ./volumes/proxy/nginx/supabase-nginx.conf.tpl:/etc/nginx/supabase-nginx.conf.tpl:ro - nginx_letsencrypt:/etc/letsencrypt volumes: nginx_letsencrypt: