mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
[init] bail out in case the db access fails (#123)
* [init] bail out in case the db access fails Signed-off-by: Jakob Ackermann <das7pad@outlook.com> * [misc] bail out in case any command in an init_script failed NOTE: sh does not support `-o pipefail`. Signed-off-by: Jakob Ackermann <das7pad@outlook.com>
This commit is contained in:
parent
47e51a2075
commit
e83b7856c3
5 changed files with 12 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
mkdir -p /var/lib/sharelatex/data
|
mkdir -p /var/lib/sharelatex/data
|
||||||
chown www-data:www-data /var/lib/sharelatex/data
|
chown www-data:www-data /var/lib/sharelatex/data
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
set -e -o pipefail
|
||||||
|
|
||||||
# generate secrets and defines them as environment variables
|
# generate secrets and defines them as environment variables
|
||||||
# https://github.com/phusion/baseimage-docker#centrally-defining-your-own-environment-variables
|
# https://github.com/phusion/baseimage-docker#centrally-defining-your-own-environment-variables
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
set -e -o pipefail
|
||||||
|
|
||||||
# See the bottom of http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
|
# See the bottom of http://stackoverflow.com/questions/24319662/from-inside-of-a-docker-container-how-do-i-connect-to-the-localhost-of-the-mach
|
||||||
echo "`route -n | awk '/UG[ \t]/{print $2}'` dockerhost" >> /etc/hosts
|
echo "`route -n | awk '/UG[ \t]/{print $2}'` dockerhost" >> /etc/hosts
|
|
@ -1,4 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
echo "Checking can connect to mongo and redis"
|
echo "Checking can connect to mongo and redis"
|
||||||
cd /var/www/sharelatex && grunt check:redis
|
cd /var/www/sharelatex && grunt check:redis
|
||||||
cd /var/www/sharelatex && grunt check:mongo
|
cd /var/www/sharelatex && grunt check:mongo
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
which node
|
which node
|
||||||
which grunt
|
which grunt
|
||||||
ls -al /var/www/sharelatex/migrations
|
ls -al /var/www/sharelatex/migrations
|
||||||
|
|
Loading…
Reference in a new issue