Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prefer compose config over building containers #1994

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

oliv3r
Copy link

@oliv3r oliv3r commented May 29, 2023

There doesn't seem to be a need to prefer building custom containers,
just to add a config file, a need that is easily solved with compose
configs. Configs are still managed through git, just no new container
needs to be built, slightly simplifying things.

While here, fix a cron-race-condition with regards the app container.

There doesn't seem to be a need to prefer building custom containers,
just to add a config file, a need that is easily solved with compose
configs. Configs are still managed through git, just no new container
needs to be built, slightly simplifying things.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
The cron container requires the files created by the app container, to
start its cron tasks. There is a potential race condition here, where
cron starts to run before the app container is even up, before the app
container has populated `/var/www/html`. This is undesired and easily
solved by making sure cron depends on the app container.

Signed-off-by: Olliver Schinagl <oliver@schinagl.nl>
@J0WI
Copy link
Contributor

J0WI commented May 31, 2023

This was on purpose due #538 (comment)

@oliv3r
Copy link
Author

oliv3r commented May 31, 2023

@J0WI fair nuff; but it's 5 years later ... having bad practices in examples cause of windows is a poor excuse :D A note should be enough maybe?

restart: always
ports:
- 80:80
- 443:443
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
configs:
- source: proxy
target: /etc/nginx/conf.d/uploadsize.conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So far, we always used volumes instead of configs

@joshtrichards joshtrichards added the examples Compose/Dockerfile/etc label May 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Compose/Dockerfile/etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants