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

Supervisor integration #318

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions 3.7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,10 @@ COPY start.sh /app/start.sh
COPY startapache.sh /app/startapache.sh
COPY startpostgres.sh /app/startpostgres.sh

# Supervisor
RUN apt-get -y update -qq && apt-get -y install supervisor && apt-get clean
COPY conf.d/replication.conf /etc/supervisor/conf.d/replication.conf

# Collapse image to single layer.
FROM scratch

Expand Down
11 changes: 11 additions & 0 deletions 3.7/conf.d/replication.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[program:replication]
command=nominatim replication --project-dir /nominatim
user=nominatim
process_name=%(program_name)s_%(process_num)02d
numprocs=1
autostart=true
autorestart=true
startsecs=0
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
1 change: 1 addition & 0 deletions 3.7/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ cd ${PROJECT_DIR} && nominatim refresh --website

service postgresql start
service apache2 start
service supervisor start

# fork a process and wait for it
tail -f /var/log/postgresql/postgresql-12-main.log &
Expand Down
4 changes: 4 additions & 0 deletions 4.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ COPY start.sh /app/start.sh
COPY startapache.sh /app/startapache.sh
COPY startpostgres.sh /app/startpostgres.sh

# Supervisor
RUN apt-get -y update -qq && apt-get -y install supervisor && apt-get clean
COPY conf.d/replication.conf /etc/supervisor/conf.d/replication.conf

# Collapse image to single layer.
FROM scratch

Expand Down
11 changes: 11 additions & 0 deletions 4.0/conf.d/replication.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[program:replication]
command=nominatim replication --project-dir /nominatim
user=nominatim
process_name=%(program_name)s_%(process_num)02d
numprocs=1
autostart=true
autorestart=true
startsecs=0
redirect_stderr=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes=0
1 change: 1 addition & 0 deletions 4.0/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ service postgresql start
cd ${PROJECT_DIR} && sudo -E -u nominatim nominatim refresh --website --functions

service apache2 start
service supervisor start

# fork a process and wait for it
tail -f /var/log/postgresql/postgresql-12-main.log &
Expand Down