prom3theu5 / aspirational-manifests

Handle deployments of .NET Aspire AppHost Projects
MIT License
702 stars 36 forks source link

[Feature] Replace secrets in compose #151

Open hades200082 opened 7 months ago

hades200082 commented 7 months ago

🚀 Feature Description

As a Devops admin, I'd like to deploy via docker-compose using environment variables for secrets, to automate deployments with secrets.

✔ Goals

🧰 Possible Solution

For example...

version: "3.8"
services:
  aspire-dashboard:
    container_name: "aspire-dashboard"
    image: "mcr.microsoft.com/dotnet/nightly/aspire-dashboard:8.0.0-preview.5"
    environment:
      DOTNET_DASHBOARD_UNSECURED_ALLOW_ANONYMOUS: "true"
    ports:
    - target: 18888
      published: 18888
    - target: 18889
      published: 4317
    restart: unless-stopped
  amqp-transport:
    container_name: "amqp-transport"
    image: "rabbitmq:3-management"
    environment:
      RABBITMQ_DEFAULT_USER: "guest"
      RABBITMQ_DEFAULT_PASS: ${SERVICE_PASSWORD_AMQP-TRANSPORT}
      OTEL_EXPORTER_OTLP_ENDPOINT: "http://aspire-dashboard:4317"
    volumes:
    - "test-apphost-amqp-transport-data:/var/lib/rabbitmq"
    ports:
    - target: 5672
      published: 5672
    - target: 15672
      published: 15672
    restart: unless-stopped
volumes:
  test-apphost-amqp-transport-data: {}

🚧 Blocked by

hades200082 commented 7 months ago

Probably worth looking at how Coolify handles environment variables to auto-generate things too: https://coolify.io/docs/knowledge-base/add-a-service