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:
+29
-24
@@ -1,39 +1,39 @@
|
||||
# Development configuration for deploy/compose.yml + compose.dev.yml.
|
||||
# Copy to deploy/.env and adjust. Not versioned.
|
||||
# Copy to deploy/.env and adjust.
|
||||
#
|
||||
# cp deploy/.env.example deploy/.env
|
||||
#
|
||||
# Requires ../../../Infrastructure running first (Postgres, Zitadel,
|
||||
# SeaweedFS, RabbitMQ, Jaeger). See ../../../Infrastructure/README.md.
|
||||
# Everything marked "must match Infrastructure's .env" below has to be the
|
||||
# same value as the one in that file.
|
||||
|
||||
DOTNET_ENVIRONMENT=Development
|
||||
|
||||
# --- Public URLs -------------------------------------------------------------
|
||||
# How each service is reached from *outside* Docker. `host.docker.internal`
|
||||
# resolves to the same address from the browser, from apps running on the host
|
||||
# and from inside the containers, which is what makes the OIDC issuer and the
|
||||
# presigned S3 URLs valid in both run modes.
|
||||
# resolves to the same address from the browser, from apps running on the
|
||||
# host and from inside the containers, which is what makes the OIDC issuer
|
||||
# and the presigned S3 URLs valid in both run modes.
|
||||
PUBLIC_WEB_URL=http://localhost:3000
|
||||
PUBLIC_API_URL=http://localhost:5111
|
||||
PUBLIC_STREAM_URL=http://localhost:8081
|
||||
PUBLIC_AUTH_URL=http://host.docker.internal:8080
|
||||
|
||||
# --- PostgreSQL (shared by Musify and Zitadel) -------------------------------
|
||||
# --- PostgreSQL (Infrastructure's shared instance, Musify's own database) ---
|
||||
# POSTGRES_USER / POSTGRES_PASSWORD must match Infrastructure's .env.
|
||||
POSTGRES_HOST=host.docker.internal
|
||||
POSTGRES_USER=postgres
|
||||
POSTGRES_PASSWORD=postgres
|
||||
POSTGRES_DB=musify_db
|
||||
POSTGRES_HOST_PORT=59000
|
||||
|
||||
# --- Zitadel (OIDC) ----------------------------------------------------------
|
||||
# The masterkey MUST be exactly 32 characters. The external domain/port form
|
||||
# the token issuer, so they have to match PUBLIC_AUTH_URL. Changing them needs
|
||||
# a re-init: docker compose -f deploy/compose.yml -f deploy/compose.dev.yml down -v
|
||||
ZITADEL_MASTERKEY=MasterkeyNeedsToHave32Characters
|
||||
ZITADEL_EXTERNAL_DOMAIN=host.docker.internal
|
||||
ZITADEL_EXTERNAL_PORT=8080
|
||||
ZITADEL_EXTERNAL_SECURE=false
|
||||
ZITADEL_DATABASE_PASSWORD=zitadel
|
||||
# Console login: <username>@zitadel.<external domain>
|
||||
ZITADEL_ADMIN_USERNAME=admin
|
||||
ZITADEL_ADMIN_PASSWORD=Password1!
|
||||
# Allows the OIDC apps to use plain-http redirect URIs (dev only).
|
||||
# --- Zitadel (OIDC, shared instance) -----------------------------------------
|
||||
# Path to the admin service-account PAT Infrastructure's Zitadel writes on
|
||||
# init. Adjust if your Infrastructure checkout lives somewhere else relative
|
||||
# to this one.
|
||||
ZITADEL_ADMIN_PAT_DIR=../../../Infrastructure/zitadel/.output
|
||||
# Allows the OIDC apps this project creates to use plain-http redirect URIs
|
||||
# (dev only).
|
||||
ZITADEL_DEV_MODE=true
|
||||
|
||||
# OIDC clients: the zitadel-init one-shot service (see compose.yml) fills
|
||||
@@ -42,17 +42,25 @@ AUTH_CLIENT_ID=
|
||||
WEB_CLIENT_ID=
|
||||
WEB_CLIENT_SECRET=
|
||||
|
||||
# --- RabbitMQ (MassTransit) --------------------------------------------------
|
||||
# --- RabbitMQ (shared instance, MassTransit) --------------------------------
|
||||
# Must match Infrastructure's .env.
|
||||
RABBITMQ_HOST=host.docker.internal
|
||||
RABBITMQ_DEFAULT_USER=guest
|
||||
RABBITMQ_DEFAULT_PASS=guest
|
||||
|
||||
# --- SeaweedFS (S3) ----------------------------------------------------------
|
||||
# --- SeaweedFS (S3, shared instance, Musify's own bucket) --------------------
|
||||
# S3_ACCESS_KEY / S3_SECRET_KEY must match Infrastructure's .env.
|
||||
SEAWEEDFS_HOST=host.docker.internal
|
||||
S3_ACCESS_KEY=admin_access_key
|
||||
S3_SECRET_KEY=admin_secret_key
|
||||
S3_BUCKET=webapi-storage
|
||||
S3_PUBLIC_URL=http://host.docker.internal:8333
|
||||
S3_INTERNAL_URL=http://host.docker.internal:8333
|
||||
S3_USE_HTTP=true
|
||||
|
||||
# --- Jaeger (shared instance, tracing) ---------------------------------------
|
||||
JAEGER_HOST=host.docker.internal
|
||||
|
||||
# --- Web player --------------------------------------------------------------
|
||||
# Key material for the encrypted session cookie: any long random string.
|
||||
SESSION_SECRET=dev-session-secret-change-me-0123456789abcdef
|
||||
@@ -61,6 +69,3 @@ AUTH_ALLOW_INSECURE_HTTP=true
|
||||
|
||||
# --- Misc --------------------------------------------------------------------
|
||||
AUTH_REQUIRE_HTTPS=false
|
||||
PGADMIN_DEFAULT_EMAIL=admin@musify.dev
|
||||
PGADMIN_DEFAULT_PASSWORD=admin
|
||||
PGADMIN_HOST_PORT=5050
|
||||
|
||||
Reference in New Issue
Block a user