Update docker files

This commit is contained in:
Daniel Brendel
2024-02-20 23:50:35 +01:00
parent 9e1fea1ca7
commit e4043fb60b
4 changed files with 14 additions and 3 deletions

View File

@@ -52,7 +52,7 @@ users have taken. The system features collaborative management, so you can manag
- ⚙️ Profile management
- 🔑 Admin dashboard
- 📢 Reminders
- 💾 Import/Export
- 💾 Backups
## Resources

View File

@@ -8,6 +8,7 @@ services:
volumes:
- app_images:/var/www/html/public/img
- app_logs:/var/www/html/app/logs
- app_backup:/var/www/html/public/backup
environment:
APP_ADMIN_EMAIL: "admin@example.com"
APP_ADMIN_PASSWORD: "password"
@@ -67,3 +68,4 @@ volumes:
db_data:
app_images:
app_logs:
app_backup:

View File

@@ -97,7 +97,7 @@ add_initial_settings_if_missing() {
# Function to create initial settings
create_app_settings() {
mysql -u "$DB_USERNAME" -p"$DB_PASSWORD" -h "$DB_HOST" -D "$DB_DATABASE" -e "INSERT INTO AppModel (id, workspace, language, scroller, chat_enable, chat_timelimit, chat_showusers, chat_indicator, history_enable, history_name, enable_media_share, cronjob_pw, overlay_alpha, smtp_fromname, smtp_fromaddress, smtp_host, smtp_port, smtp_username, smtp_password, smtp_encryption, created_at) VALUES (NULL, '$APP_WORKSPACE', '$APP_LANG', $APP_ENABLE_SCROLLER, $APP_ENABLE_CHAT, $APP_ONLINE_MINUTE_LIMIT, $APP_SHOW_CHAT_ONLINE_USERS, $APP_SHOW_CHAT_TYPING_INDICATOR, $APP_ENABLE_HISTORY, '$APP_HISTORY_NAME', $APP_ENABLE_PHOTO_SHARE, '$APP_CRON_PW', $APP_OVERLAY_ALPHA, '$SMTP_FROMNAME', '$SMTP_FROMADDRESS', '$SMTP_HOST', $SMTP_PORT, '$SMTP_USERNAME', '$SMTP_PASSWORD', '$SMTP_ENCRYPTION', CURRENT_TIMESTAMP);"
mysql -u "$DB_USERNAME" -p"$DB_PASSWORD" -h "$DB_HOST" -D "$DB_DATABASE" -e "INSERT INTO AppModel (id, workspace, language, scroller, chat_enable, chat_timelimit, chat_showusers, chat_indicator, history_enable, history_name, enable_media_share, cronjob_pw, overlay_alpha, smtp_fromname, smtp_fromaddress, smtp_host, smtp_port, smtp_username, smtp_password, smtp_encryption, pwa_enable, created_at) VALUES (NULL, '$APP_WORKSPACE', '$APP_LANG', $APP_ENABLE_SCROLLER, $APP_ENABLE_CHAT, $APP_ONLINE_MINUTE_LIMIT, $APP_SHOW_CHAT_ONLINE_USERS, $APP_SHOW_CHAT_TYPING_INDICATOR, $APP_ENABLE_HISTORY, '$APP_HISTORY_NAME', $APP_ENABLE_PHOTO_SHARE, '$APP_CRON_PW', $APP_OVERLAY_ALPHA, '$SMTP_FROMNAME', '$SMTP_FROMADDRESS', '$SMTP_HOST', $SMTP_PORT, '$SMTP_USERNAME', '$SMTP_PASSWORD', '$SMTP_ENCRYPTION', 0, CURRENT_TIMESTAMP);"
echo "App settings profile created."
}
@@ -180,12 +180,16 @@ add_admin_user_if_missing
# Copy default images
cp /tmp/img/* /var/www/html/public/img
# Set permissions to folders for file upload
# Set permissions to folders for images
chown -R www-data:www-data /var/www/html/public/img
chmod 755 /var/www/html/public/img
# Set permissions to folders for logs
chown -R www-data:www-data /var/www/html/app/logs
# Set permissions to folders for backups
chown -R www-data:www-data /var/www/html/public/backup
chmod 755 /var/www/html/public/backup
# Then exec the container's main process (CMD)
exec "$@"

View File

@@ -26,6 +26,7 @@ RUN apt-get update \
libjpeg-dev \
libonig-dev \
libxml2-dev \
libzip-dev \
zip \
unzip \
git \
@@ -39,6 +40,7 @@ RUN apt-get update \
exif \
pcntl \
bcmath \
zip \
# Configure and install GD
&& docker-php-ext-configure gd --with-jpeg \
&& docker-php-ext-install gd
@@ -60,6 +62,9 @@ VOLUME ["/var/www/html/public/img"]
# Create volume for logs
VOLUME ["/var/www/html/app/logs"]
# Create volume for backups
VOLUME ["/var/www/html/app/backup"]
# Copy the PHP overrides
COPY ./99-php.ini /usr/local/etc/php/conf.d/