Improved entryscript control

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2020-02-01 11:37:37 +01:00
parent dfcbc75630
commit 89003a903b
3 changed files with 12 additions and 3 deletions
+7
View File
@@ -24,6 +24,13 @@
owner: root owner: root
group: root group: root
mode: 0644 mode: 0644
- name: copy entry script
template:
src: etc/rt/entryscript.sh.j2
dest: /etc/rt/entryscript.sh
owner: root
group: root
mode: 0644
- name: copy postgresql config - name: copy postgresql config
template: template:
src: etc/rt/postgresql.conf.j2 src: etc/rt/postgresql.conf.j2
@@ -26,12 +26,12 @@ services:
- /var/run/docker.sock:/var/run/docker.sock - /var/run/docker.sock:/var/run/docker.sock
- /etc/rt/setup.sh:/usr/local/bin/setup.sh - /etc/rt/setup.sh:/usr/local/bin/setup.sh
- /etc/rt/wait-for.sh:/usr/local/bin/wait-for.sh - /etc/rt/wait-for.sh:/usr/local/bin/wait-for.sh
- /etc/rt/entryscript.sh:/usr/local/bin/entryscript.sh
restart: always restart: always
entrypoint: entrypoint:
- /usr/local/bin/wait-for.sh - /sbin/tini
- database:5432
- -- - --
- /usr/local/bin/setup.sh - /usr/local/bin/entryscript.sh
networks: networks:
- db_conn - db_conn
environment: environment:
@@ -0,0 +1,2 @@
#!/bin/sh
/usr/local/bin/wait-for.sh database:5432 -- /usr/local/bin/setup.sh