update docker stuff

This commit is contained in:
Michael Parker 2020-04-11 21:11:21 -04:00
parent 1327bbbbe5
commit 8fdee3554c
7 changed files with 25 additions and 20 deletions

View file

@ -31,7 +31,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
# the fastcgi_pass path needs to be changed accordingly when using CentOS
fastcgi_pass unix:/var/run/php/php-fpm7.2.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";

View file

@ -1,4 +1,4 @@
# If using Ubuntu this file should be placed in:
# If using Ubuntu this file should be placed in:
# /etc/nginx/sites-available/
#
server {
@ -49,7 +49,7 @@ server {
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php-fpm7.2.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param PHP_VALUE "upload_max_filesize = 100M \n post_max_size=100M";

View file

@ -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

View file

@ -20,12 +20,12 @@ supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[program:php-fpm]
command=/usr/sbin/php-fpm7 -F
command=/usr/local/sbin/php-fpm -F
autostart=true
autorestart=true
[program:queue-worker]
command=/usr/bin/php /app/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
command=/usr/local/bin/php /app/artisan queue:work --queue=high,standard,low --sleep=3 --tries=3
user=nginx
autostart=true
autorestart=true

View file

@ -1,9 +1,9 @@
[pterodactyl]
[www]
user = nginx
group = nginx
listen = /var/run/php/php-fpm7.2.sock
listen = 127.0.0.1:9000
listen.owner = nginx
listen.group = nginx
listen.mode = 0750