Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/defanglabs/secrets-sidecar
Converts secrets in ECS from environment variables to Docker Compose files under `/run/secrets`
https://github.com/defanglabs/secrets-sidecar
proof-of-concept
Last synced: about 2 months ago
JSON representation
Converts secrets in ECS from environment variables to Docker Compose files under `/run/secrets`
- Host: GitHub
- URL: https://github.com/defanglabs/secrets-sidecar
- Owner: DefangLabs
- License: mit
- Created: 2023-08-12T19:12:31.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-12T19:58:27.000Z (over 1 year ago)
- Last Synced: 2024-05-16T21:38:58.802Z (7 months ago)
- Topics: proof-of-concept
- Language: Makefile
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# secrets-sidecar
Converts secrets in ECS from environment variables to Docker Compose files under `/run/secrets`. See https://docs.docker.com/compose/use-secrets/ .1. Iterates over all environment variables, checking for prefix `secret_`
2. Creates a file under `/run/secrets` with the name of the environment variable without the prefix
3. Returns non-zero exit code if any of the files fail to be createdYou'd want to add this sidecar to your ECS task definition as a non-essential container and add a volume for `/run/secrets`. Then, add `volumeFrom` to your main container. See https://docs.aws.amazon.com/AmazonECS/latest/developerguide/bind-mounts.html#bind-mount-examples, section "To mount volumes from another container using volumesFrom".
Test from command line:
```
make build
./secrets
```Use the existing docker image locally:
```
docker run lionello/secrets-sidecar
```Build your own docker image:
```
make docker
```Push all docker images and multi-arch manifest:
```
make push
```