mirror of
https://github.com/viq/NewsBlur.git
synced 2025-08-05 16:49:45 +00:00
Adding CMD to postgres dockerfile.
This commit is contained in:
parent
2a8d1096bc
commit
2690acdf63
3 changed files with 5 additions and 6 deletions
|
@ -58,6 +58,7 @@
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Start postgres docker containers
|
- name: Start postgres docker containers
|
||||||
|
become: yes
|
||||||
docker_container:
|
docker_container:
|
||||||
name: postgres
|
name: postgres
|
||||||
image: newsblur/postgres:13
|
image: newsblur/postgres:13
|
||||||
|
@ -76,7 +77,6 @@
|
||||||
- postgres
|
- postgres
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432:5432
|
||||||
user: "{{ ansible_effective_user_id|int }}:{{ ansible_effective_group_id|int }}"
|
|
||||||
volumes:
|
volumes:
|
||||||
- /srv/newsblur/docker/volumes/postgres/data:/var/lib/postgresql/data
|
- /srv/newsblur/docker/volumes/postgres/data:/var/lib/postgresql/data
|
||||||
- /srv/newsblur/docker/volumes/postgres/archive:/var/lib/postgresql/archive
|
- /srv/newsblur/docker/volumes/postgres/archive:/var/lib/postgresql/archive
|
||||||
|
|
|
@ -2,8 +2,7 @@ FROM postgres:13
|
||||||
|
|
||||||
RUN apt update && apt install -y openssh-client rsync
|
RUN apt update && apt install -y openssh-client rsync
|
||||||
|
|
||||||
RUN usermod -u 1000 postgres
|
|
||||||
RUN groupmod -g 1001 postgres
|
|
||||||
|
|
||||||
COPY entrypoint.sh /entrypoint.sh
|
COPY entrypoint.sh /entrypoint.sh
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|
||||||
|
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
|
||||||
|
|
|
@ -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.
|
# 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 = 'rsync -a -e "ssh -i /var/lib/postgresql/.ssh/id_rsa" nb@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 = 'cp /var/lib/postgresql/archive/%f %p' # command to use to restore an archived logfile segment
|
||||||
# placeholders: %p = path of file to restore
|
# placeholders: %p = path of file to restore
|
||||||
# %f = file name only
|
# %f = file name only
|
||||||
# e.g. 'cp /mnt/server/archivedir/%f %p'
|
# e.g. 'cp /mnt/server/archivedir/%f %p'
|
||||||
|
|
Loading…
Add table
Reference in a new issue