-
Notifications
You must be signed in to change notification settings - Fork 446
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
Bugfix: correctly shutdown even without replication #554
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,9 +8,10 @@ ENV LANG=C.UTF-8 | |
|
||
WORKDIR /app | ||
|
||
RUN true \ | ||
RUN \ | ||
--mount=type=cache,target=/var/cache/apt \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you explain what is happening here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's a feature introduces (relatively) recently by Docker buildkit: https://docs.docker.com/build/cache/#use-the-dedicated-run-cache. |
||
# Do not start daemons after installation. | ||
&& echo '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d \ | ||
echo '#!/bin/sh\nexit 101' > /usr/sbin/policy-rc.d \ | ||
&& chmod +x /usr/sbin/policy-rc.d \ | ||
# Install all required packages. | ||
&& apt-get -y update -qq \ | ||
|
@@ -75,7 +76,8 @@ RUN true \ | |
&& echo "listen_addresses='*'" >> /etc/postgresql/14/main/postgresql.conf | ||
|
||
# Osmium install to run continuous updates. | ||
RUN pip3 install osmium | ||
RUN --mount=type=cache,target=/root/.cache/pip \ | ||
pip3 install osmium | ||
|
||
# Nominatim install. | ||
ARG NOMINATIM_VERSION | ||
|
@@ -107,12 +109,10 @@ RUN true \ | |
liblua*-dev \ | ||
postgresql-server-dev-14 \ | ||
nlohmann-json3-dev \ | ||
&& apt-get clean \ | ||
# Clear temporary files and directories. | ||
&& rm -rf \ | ||
/tmp/* \ | ||
/var/tmp/* \ | ||
/root/.cache \ | ||
/app/src/.git \ | ||
/var/lib/apt/lists/* \ | ||
# Remove nominatim source and build directories | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried a few times to get rid of these sleeps but always failed. I'm going to run the tests a few times to see if there is any difference now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
According to the python script, it should automatically retry failed connection with an exponential backoff.
Hard-coding a forced sleep may prolong the test more than necessary, while the container may be already ready before the timeout. IMHO a polling HTTP call done periodically by the script sounds more snappy than the forced
sleep
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still wasn't enough though. I will run it a few times and see.