Skip to content

Commit

Permalink
Update compose to load secrets
Browse files Browse the repository at this point in the history
  • Loading branch information
cr0wst committed Jan 2, 2025
1 parent 1f94e8f commit 98a45c7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ version: "3.8"
services:
app:
image: ghcr.io/indy-center/controller-tools:main
environment:
- NON_SECRET_ENV_VAR=example_value
networks:
- web
labels:
Expand All @@ -12,14 +14,15 @@ services:
- "traefik.http.services.controller-tools.loadbalancer.server.port=3000"
- "traefik.http.routers.controller-tools.tls.certresolver=myresolver"
secrets:
- controller-tools-secret
- controller-tools-database-url
entrypoint: >
sh -c "export $(cat /run/secrets/controller-tools-secret | xargs) &&
node build" # Replace `npm start` with your actual application start command
sh -c "export DATABASE_URL=$$(cat /run/secrets/controller-tools-database-url) && node build"
networks:
web:
external: true

secrets:
controller-tools-secret:
controller-tools-database-url:
external: true

0 comments on commit 98a45c7

Please sign in to comment.