Updated to wait-for and fixed cond-init.d script
This commit is contained in:
parent
79c5cd91f3
commit
bdf3aed5c3
@ -24,7 +24,8 @@ COPY root /
|
||||
RUN curl -L -s https://github.com/just-containers/s6-overlay/releases/download/v1.19.1.1/s6-overlay-amd64.tar.gz | tar xvzf - -C /
|
||||
|
||||
# Add wait-for-it.sh
|
||||
ADD https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh /srv
|
||||
ADD https://raw.githubusercontent.com/Eficode/wait-for/master/wait-for /srv
|
||||
RUN chmod 755 /srv/wait-for
|
||||
|
||||
# Expose Nginx ports.
|
||||
EXPOSE 8080
|
||||
|
||||
@ -5,18 +5,19 @@
|
||||
|
||||
#############
|
||||
# This simply duplicates the logic from ttrss-configure-db.php
|
||||
ename = 'DB';
|
||||
eport = 5432;
|
||||
ename='DB';
|
||||
eport=5432;
|
||||
|
||||
if [ $DB_TYPE = 'pgsql ];
|
||||
if [ '$DB_TYPE' = 'mysql' ];
|
||||
then
|
||||
eport = 5432;
|
||||
dbhost = DB_PORT_5432_TCP_ADDR
|
||||
eport=3306;
|
||||
dbhost=$DB_PORT_3306_TCP_ADDR
|
||||
else
|
||||
eport = 3306;
|
||||
dbhost = DB_PORT_3306_TCP_ADDR
|
||||
eport=5432;
|
||||
dbhost=$DB_PORT_5432_TCP_ADDR
|
||||
fi
|
||||
#############
|
||||
|
||||
# Run wait-for-it.sh to confirm DB comes up before we proceed
|
||||
/srv/wait-for-it.sh $dbhost:$eport
|
||||
echo "Waiting for $dbhost:$eport..."
|
||||
/srv/wait-for $dbhost:$eport -- echo "Done"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user