mirror of
https://github.com/ciur/papermerge.git
synced 2026-04-25 12:05:58 +03:00
[GH-ISSUE #197] [Docker] include checks in the app and worker image to delay initial startup until db is ready #157
Labels
No labels
2.1
3.0
3.0.1
3.0.2
3.0.3
3.0.3
3.1
3.2
3.2
3.3
3.5
3.x
Fixed. Waiting for feedback.
Fixed. Waiting for feedback.
UX
Version 2.1 - alpha
XSS
announcement
beta
blocker
bug
cannot reproduce
confirmed
confirmed
critical
demo
dependencies
deployment
detchnical debt
discussion
docker
documentation
donations
duplicate
enhancement
feature request
frontend
fundraising
good first issue
good issue
help wanted
high
implemented
important
improvement
incomplete
invalid
investigation
kubernetes
low
low impact
medium
medium
medium impact
migration from 2.0
migration from 2.1
missing-language
missing-ocr-language
no-activity
note
ocr
outofscope
packaging
performance
popular request
pull-request
pypi
question
raspberry pi
roadmap
search
security
setup
status
task
technical debt
updates
user xp
version 1.4.0 - demo
will be implemented
will not be implemented
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/papermerge#157
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maspiter on GitHub (Oct 27, 2020).
Original GitHub issue: https://github.com/ciur/papermerge/issues/197
Originally assigned to: @ciur on GitHub.
I'm trying to build a custom docker image with app, worker and general configuration files.
I noticed that running the app for the first time generates errors in the worker and app containers because db is not ready yet.
Stopping and restarting the app makes it work but not without errors
Expected
Scripts that check for readyness of the db container before completing initial setup.
Actual
Errors in the app and worker application (is host db ready and accepting connections on 5432)
Info:
@maspiter commented on GitHub (Oct 28, 2020):
Ok, so I built a custom image with the wait-for-it.sh script in the config directory and then use the following command in my docker compose file:
command: ["/opt/app/wait-for-it.sh", "-s", "-t", "60", "db:5432", "--", "/opt/app/startup.sh"]
This starts the containers as it should on first boot. Other boots are much quicker but this to ensure the DB is ready before starting the other containers.
Would it be possible to include this script by default in the docker config files?