Move shared infrastructure to a separate Infrastructure repo
Postgres, Zitadel, SeaweedFS, RabbitMQ and Jaeger no longer run as part of this stack. They're shared services (used by Musify, Ping and docker-manager) that now live in a separate Infrastructure repository and must already be running. deploy/compose.yml keeps only what's specific to Musify: its own database connection, its own OIDC app and storage bucket (created against the shared Zitadel/SeaweedFS via zitadel-init/seaweedfs-init), and the application containers. A new wait-for-postgres one-shot replaces the in-file Postgres health check, which no longer works now that Postgres lives in a different compose project. compose.prod.yml joins Infrastructure's infra-net network instead of running its own copies. Docs and READMEs updated to match.
This commit is contained in:
+16
-50
@@ -1,67 +1,36 @@
|
||||
name: musify-dev
|
||||
|
||||
# Development overlay: publishes the infrastructure ports to the host so the
|
||||
# .NET apps and the web player can run from the IDE, and adds pgAdmin.
|
||||
# Development overlay: publishes Musify's own ports to the host so the .NET
|
||||
# apps and the web player can run from the IDE.
|
||||
#
|
||||
# docker compose -f deploy/compose.yml -f deploy/compose.dev.yml up -d
|
||||
# docker compose -f deploy/compose.yml -f deploy/compose.dev.yml --profile apps up -d --build
|
||||
#
|
||||
# `host.docker.internal` (see ZITADEL_EXTERNAL_DOMAIN / *_PUBLIC_URL in .env)
|
||||
# resolves to the same address from the browser, from apps on the host and from
|
||||
# inside the containers, so the OIDC issuer and the presigned S3 URLs are valid
|
||||
# in both modes. `extra_hosts` gives Linux containers that same name.
|
||||
# Postgres/Zitadel/SeaweedFS/RabbitMQ/Jaeger ports come from Infrastructure's
|
||||
# own compose.dev.yml, not from here. See ../../../Infrastructure/README.md.
|
||||
# `host.docker.internal` resolves to the same address from the browser, from
|
||||
# apps on the host and from inside these containers, which is what makes the
|
||||
# OIDC issuer and the presigned S3 URLs valid in both run modes. `extra_hosts`
|
||||
# gives Linux containers that same name.
|
||||
|
||||
x-host-alias: &host-alias
|
||||
- "${ZITADEL_EXTERNAL_DOMAIN}:host-gateway"
|
||||
- "host.docker.internal:host-gateway"
|
||||
|
||||
services:
|
||||
postgres:
|
||||
ports:
|
||||
- "${POSTGRES_HOST_PORT}:5432"
|
||||
wait-for-postgres:
|
||||
extra_hosts: *host-alias
|
||||
|
||||
zitadel:
|
||||
ports:
|
||||
- "${ZITADEL_EXTERNAL_PORT}:8080"
|
||||
|
||||
rabbitmq:
|
||||
ports:
|
||||
- "5672:5672" # AMQP -> MassTransit
|
||||
- "15672:15672" # management UI
|
||||
|
||||
seaweedfs:
|
||||
ports:
|
||||
- "9333:9333" # master / admin UI
|
||||
- "8888:8888" # filer -> StreamingGateway
|
||||
- "8333:8333" # S3 API -> API, Worker and presigned uploads
|
||||
|
||||
jaeger:
|
||||
ports:
|
||||
- "16686:16686" # UI
|
||||
- "4317:4317" # OTLP gRPC
|
||||
- "4318:4318" # OTLP HTTP
|
||||
seaweedfs-init:
|
||||
extra_hosts: *host-alias
|
||||
|
||||
# zitadel-init (compose.yml) edits whichever env file is mounted here.
|
||||
zitadel-init:
|
||||
extra_hosts: *host-alias
|
||||
volumes:
|
||||
- ./.env:/workspace/.env
|
||||
|
||||
# Optional Postgres UI: docker compose ... --profile tools up -d
|
||||
pgadmin:
|
||||
profiles: [tools]
|
||||
image: dpage/pgadmin4:latest
|
||||
container_name: musify-pgadmin
|
||||
environment:
|
||||
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
|
||||
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
|
||||
PGADMIN_CONFIG_SERVER_MODE: "False"
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- "${PGADMIN_HOST_PORT}:80"
|
||||
volumes:
|
||||
- pgadmin_data:/var/lib/pgadmin
|
||||
restart: unless-stopped
|
||||
migrate:
|
||||
extra_hosts: *host-alias
|
||||
|
||||
api:
|
||||
ports:
|
||||
@@ -80,6 +49,3 @@ services:
|
||||
ports:
|
||||
- "3000:3000"
|
||||
extra_hosts: *host-alias
|
||||
|
||||
volumes:
|
||||
pgadmin_data:
|
||||
|
||||
Reference in New Issue
Block a user