mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -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
ac82600b74
commit
3170a27fb5
5 changed files with 12 additions and 3 deletions
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
mkdir -p /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
|
||||
# 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
|
||||
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
|
||||
set -e
|
||||
|
||||
echo "Checking can connect to mongo and redis"
|
||||
cd /var/www/sharelatex && grunt check:redis
|
||||
cd /var/www/sharelatex && grunt check:mongo
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
which node
|
||||
which grunt
|
||||
ls -al /var/www/sharelatex/migrations
|
||||
|
|
Loading…
Reference in a new issue