update docker stuff
This commit is contained in:
parent
3d224993cd
commit
3090c99a62
6 changed files with 23 additions and 18 deletions
|
@ -4,19 +4,19 @@
|
|||
cd /app
|
||||
|
||||
mkdir -p /var/log/panel/logs/ /var/log/supervisord/ /var/log/nginx/ /var/log/php7/ \
|
||||
&& rmdir /app/storage/logs/ \
|
||||
&& rm -rf /app/storage/logs/ \
|
||||
&& chmod 777 /var/log/panel/logs/ \
|
||||
&& ln -s /var/log/panel/logs/ /app/storage/
|
||||
|
||||
## check for .env file and generate app keys if missing
|
||||
if [ -f /app/var/.env ]; then
|
||||
echo "external vars exist."
|
||||
rm /app/.env
|
||||
rm -rf /app/.env
|
||||
|
||||
ln -s /app/var/.env /app/
|
||||
else
|
||||
echo "external vars don't exist."
|
||||
rm /app/.env
|
||||
rm -rf /app/.env
|
||||
touch /app/var/.env
|
||||
|
||||
## manually generate a key because key generate --force fails
|
||||
|
@ -31,12 +31,17 @@ fi
|
|||
echo "Checking if https is required."
|
||||
if [ -f /etc/nginx/conf.d/default.conf ]; then
|
||||
echo "Using nginx config already in place."
|
||||
if [ $LE_EMAIL ]; then
|
||||
echo "Checking for cert update"
|
||||
certbot certonly -d $(echo $APP_URL | sed 's~http[s]*://~~g') --standalone -m $LE_EMAIL --agree-tos -n
|
||||
else
|
||||
echo "No letsencrypt email is set"
|
||||
fi
|
||||
else
|
||||
echo "Checking if letsencrypt email is set."
|
||||
if [ -z $LE_EMAIL ]; then
|
||||
echo "No letsencrypt email is set Failing to http."
|
||||
echo "No letsencrypt email is set using http config."
|
||||
cp .dev/docker/default.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
else
|
||||
echo "writing ssl config"
|
||||
cp .dev/docker/default_ssl.conf /etc/nginx/conf.d/default.conf
|
||||
|
|
Reference in a new issue