File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed
Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 2626 echo -e " APP_KEY=$APP_KEY " > /app/var/.env
2727 fi
2828
29+ # # generate a random salt for hashids if not provided
30+ if [ -z $HASHIDS_SALT ]; then
31+ echo -e " Generating hashids salt."
32+ HASHIDS_SALT=$( cat /dev/urandom | tr -dc ' a-zA-Z0-9!@#$%^&*()_+?><~' | fold -w 20 | head -n 1)
33+ echo -e " Generated hashids salt: $HASHIDS_SALT "
34+ echo -e " HASHIDS_SALT=$HASHIDS_SALT " >> /app/var/.env
35+ else
36+ echo -e " HASHIDS_SALT exists in environment, using that."
37+ echo -e " HASHIDS_SALT=$HASHIDS_SALT " >> /app/var/.env
38+ fi
39+
2940 ln -s /app/var/.env /app/
3041fi
3142
@@ -60,6 +71,13 @@ if [[ -z $DB_PORT ]]; then
6071 DB_PORT=3306
6172fi
6273
74+ # # check log folder permissions
75+ echo " Checking log folder permissions."
76+ if [ " $( stat -c %U:%G /app/storage/logs) " != " nginx" ]; then
77+ echo " Fixing log folder permissions."
78+ chown -R nginx: /app/storage/logs/
79+ fi
80+
6381# # check for DB up before starting the panel
6482echo " Checking database status."
6583until nc -z -v -w30 $DB_HOST $DB_PORT
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ FROM --platform=$TARGETOS/$TARGETARCH php:8.3-fpm-alpine
1414WORKDIR /app
1515COPY . ./
1616COPY --from=0 /app/public/assets ./public/assets
17- RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot certbot-nginx \
17+ RUN apk add --no-cache --update ca-certificates dcron curl git supervisor tar unzip nginx libpng-dev libxml2-dev libzip-dev certbot certbot-nginx mysql-client \
1818 && docker-php-ext-configure zip \
1919 && docker-php-ext-install bcmath gd pdo_mysql zip \
2020 && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ x-common:
3333#
3434services :
3535 database :
36- image : mariadb:10.5
36+ image : mariadb:11
3737 restart : always
3838 command : --default-authentication-plugin=mysql_native_password
3939 volumes :
@@ -70,6 +70,7 @@ services:
7070 REDIS_HOST : " cache"
7171 DB_HOST : " database"
7272 DB_PORT : " 3306"
73+ HASHIDS_LENGTH : 8
7374networks :
7475 default :
7576 ipam :
You can’t perform that action at this time.
0 commit comments