Use the shared edge nginx instead of Musify's own
CI/CD / BackEnd (push) Successful in 1m27s
CI/CD / WebPlayer (push) Successful in 39s
CI/CD / Deploy (push) Skipped
CI/CD / BackEnd (pull_request) Successful in 1m16s
CI/CD / WebPlayer (pull_request) Successful in 39s
CI/CD / Deploy (pull_request) Skipped
CI/CD / BackEnd (push) Successful in 1m27s
CI/CD / WebPlayer (push) Successful in 39s
CI/CD / Deploy (push) Skipped
CI/CD / BackEnd (pull_request) Successful in 1m16s
CI/CD / WebPlayer (pull_request) Successful in 39s
CI/CD / Deploy (pull_request) Skipped
Remove deploy/nginx and the nginx service from compose.prod.yml: the shared edge in Infrastructure owns ports 80/443 and serves every domain. Make the deploy job fail when zitadel-init or seaweedfs-init fail, and document the runner and edge setup.
This commit is contained in:
+5
-38
@@ -1,11 +1,10 @@
|
||||
name: musify-prod
|
||||
|
||||
# Production overlay: adds the nginx edge and joins Infrastructure's shared
|
||||
# `infra-net` network so this project's containers can reach Postgres,
|
||||
# Zitadel, SeaweedFS, RabbitMQ and Jaeger by container name. None of them
|
||||
# run as part of this compose project anymore (see
|
||||
# ../../../Infrastructure/README.md, which must already be up). Nothing but
|
||||
# nginx publishes a port; every other service is reachable only on infra-net.
|
||||
# Production overlay: joins Infrastructure's shared `infra-net` network so
|
||||
# this project's containers can reach Postgres, Zitadel, SeaweedFS, RabbitMQ
|
||||
# and Jaeger by container name, and so the shared edge nginx (Infrastructure's
|
||||
# `edge/`, which owns host ports 80/443 and terminates TLS for every domain)
|
||||
# can reach api, gateway and web-player. Nothing here publishes a port.
|
||||
#
|
||||
# docker compose --env-file deploy/.env.prod -f deploy/compose.yml -f deploy/compose.prod.yml up -d
|
||||
# docker compose --env-file deploy/.env.prod -f deploy/compose.yml -f deploy/compose.prod.yml --profile apps up -d --build
|
||||
@@ -20,35 +19,3 @@ services:
|
||||
zitadel-init:
|
||||
volumes:
|
||||
- ./.env.prod:/workspace/.env
|
||||
|
||||
# Every vhost proxies through `set $upstream ...; proxy_pass $upstream;`
|
||||
# with the embedded Docker DNS resolver (see nginx/templates), so nginx
|
||||
# does not need api/gateway/web-player to exist at its own startup, only
|
||||
# at request time. That is what lets it start in the FIRST command
|
||||
# (profile-gated services aren't part of that invocation yet) and still be
|
||||
# reachable at the auth domain for zitadel-init to provision through.
|
||||
nginx:
|
||||
image: nginx:1.27-alpine
|
||||
container_name: musify-nginx
|
||||
environment:
|
||||
# The entrypoint renders /etc/nginx/templates/*.template with envsubst.
|
||||
# The filter keeps it from eating nginx's own $host / $remote_addr.
|
||||
MUSIFY_WEB_DOMAIN: ${WEB_DOMAIN}
|
||||
MUSIFY_API_DOMAIN: ${API_DOMAIN}
|
||||
MUSIFY_STREAM_DOMAIN: ${STREAM_DOMAIN}
|
||||
MUSIFY_AUTH_DOMAIN: ${AUTH_DOMAIN}
|
||||
MUSIFY_S3_DOMAIN: ${S3_DOMAIN}
|
||||
MUSIFY_MAX_UPLOAD_SIZE: ${MAX_UPLOAD_SIZE:-1024m}
|
||||
NGINX_ENVSUBST_FILTER: ^MUSIFY_
|
||||
ports:
|
||||
- "80:80"
|
||||
- "443:443"
|
||||
volumes:
|
||||
- ./nginx/templates:/etc/nginx/templates:ro
|
||||
- ./nginx/snippets:/etc/nginx/snippets:ro
|
||||
- ./nginx/certs:/etc/nginx/certs:ro
|
||||
- nginx_cache:/var/cache/nginx
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
nginx_cache:
|
||||
|
||||
Reference in New Issue
Block a user