Nice 👌🏾. We could also pass secrets environments variables not plainly with something like …?
version:"3.9"services:web:build:context:../dockerfile:compose/web.Dockerfileargs:NEXT_PUBLIC_CLIENTVAR:"clientvar"ports:-3000:3000volumes:-../:/appenvironment:-DATABASE_URL=postgresql://postgres:postgres@db:5432/myapp-db?schema=public-S3_ENDPOINT=minio-S3_PORT=9000-S3_ACCESS_KEY=minio-S3_SECRET_KEY_FILE=/run/secrets/s3_secret_key-S3_BUCKET_NAME=s3bucketsecrets:-s3_secret_keydepends_on:-db-miniodb:image:postgres:15.3container_name:postgresports:-5432:5432environment:POSTGRES_USER:postgresPOSTGRES_PASSWORD_FILE:/run/secrets/db_passwordPOSTGRES_DB:myapp-dbvolumes:-postgres-data:/var/lib/postgresql/datasecrets:-db_passwordrestart:unless-stoppedminio:image:bitnami/minio:latestports:-"9000:9000"-"9001:9001"volumes:-minio_storage:/datasecrets:-s3_secret_keysecrets:db_password:file:./db_password.txt# Path to the file containing the DB passwords3_secret_key:file:./s3_secret_key.txt# Path to the file containing the S3 secret keyvolumes:postgres-data:minio_storage:
Right, you should never ever add real API keys or secrets in config files that are stored on GitHub. If you want to use other secrets, like GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET, you should store them in .env file and add it to .gitignore. Then you can use them in docker-compose.yml file like this:
Whoa t3.app is neat, makes the set up super simple. Curious for thoughts on something I'm working on which is probably overbuilt for this type of tutorial: github.com/kurtosis-tech/kurtosis
Professional Data Engineer/Business Intelligence Developer. I build build and test various data pipelines between production and analytics databases. Additionally, I design dashboards.
Nice 👌🏾. We could also pass secrets environments variables not plainly with something like …?
Nice 😊 work!
Thanks!
Right, you should never ever add real API keys or secrets in config files that are stored on GitHub. If you want to use other secrets, like
GOOGLE_CLIENT_IDandGOOGLE_CLIENT_SECRET, you should store them in .env file and add it to .gitignore. Then you can use them in docker-compose.yml file like this:And run docker-compose like this:
Totally. These files are not to be committed 🤭. By docker compose secrets, the sensitive variables are not stored as plain texts.
Thanks for this post!
Whoa t3.app is neat, makes the set up super simple. Curious for thoughts on something I'm working on which is probably overbuilt for this type of tutorial: github.com/kurtosis-tech/kurtosis
Wow, Kurtosis is a great project!
I definitely need some time to learn more about it, thanks for sharing!
For sure! Please feel free to hmu if you have any feedback or questions :)
Handy Tutorial Thanks for sharing this 🤝
Nice 🌺 work!
Niceeee 😊 !!!
Very nicely written and described
Good one
good good work
Really awesome post.
Awesome 😎
Good stuff. Thanks
Good job!
nice