mirror of
https://github.com/viq/NewsBlur.git
synced 2025-04-13 09:38:09 +00:00
Adding usermod to entrypoint.
This commit is contained in:
parent
365492b043
commit
f391c88da8
3 changed files with 14 additions and 2 deletions
|
@ -4,3 +4,6 @@ RUN apt update && apt install -y openssh-client rsync
|
|||
|
||||
RUN usermod -u 1000 postgres
|
||||
RUN groupmod -g 1001 postgres
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
|
9
docker/postgres/entrypoint.sh
Normal file
9
docker/postgres/entrypoint.sh
Normal file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
# entrypoint.sh
|
||||
|
||||
# Create a user with the specified UID/GID
|
||||
usermod -u 1000 postgres
|
||||
groupmod -g 1001 postgres
|
||||
|
||||
# Execute the original entrypoint of the image
|
||||
exec docker-entrypoint.sh postgres
|
|
@ -249,8 +249,8 @@ archive_command = 'test ! -f /var/lib/postgresql/archive/%f && cp -f %p /var/lib
|
|||
|
||||
# These are only used in recovery mode.
|
||||
|
||||
restore_command = 'rsync -a -e "ssh -i /var/lib/postgresql/.ssh/id_rsa" db-postgres.service.consul:/srv/newsblur/docker/volumes/postgres/archive/%f "%p"'
|
||||
# restore_command = 'cp /var/lib/postgresql/archive/%f %p' # command to use to restore an archived logfile segment
|
||||
# restore_command = 'rsync -a -e "ssh -i /var/lib/postgresql/.ssh/id_rsa" db-postgres.service.consul:/srv/newsblur/docker/volumes/postgres/archive/%f "%p"'
|
||||
restore_command = 'cp /var/lib/postgresql/archive/%f %p' # command to use to restore an archived logfile segment
|
||||
# placeholders: %p = path of file to restore
|
||||
# %f = file name only
|
||||
# e.g. 'cp /mnt/server/archivedir/%f %p'
|
||||
|
|
Loading…
Add table
Reference in a new issue