Allow importing themes in docker environment

This commit is contained in:
Daniel Brendel
2024-03-05 14:05:02 +01:00
parent 1e3f4426a4
commit 46918ed9c4
3 changed files with 13 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ services:
- app_images:/var/www/html/public/img
- app_logs:/var/www/html/app/logs
- app_backup:/var/www/html/public/backup
- app_themes:/var/www/html/public/themes
- app_migrate:/var/www/html/app/migrations
environment:
APP_ADMIN_EMAIL: "admin@example.com"
@@ -71,4 +72,5 @@ volumes:
app_images:
app_logs:
app_backup:
app_themes:
app_migrate:

View File

@@ -197,5 +197,11 @@ chown -R www-data:www-data /var/www/html/app/logs
chown -R www-data:www-data /var/www/html/public/backup
chmod 755 /var/www/html/public/backup
# Copy themes content
cp -r /tmp/themes/* /var/www/html/public/themes
# Set permissions to folder for themes
chown -R www-data:www-data /var/www/html/public/themes
# Then exec the container's main process (CMD)
exec "$@"

View File

@@ -65,6 +65,11 @@ VOLUME ["/var/www/html/app/logs"]
# Create volume for backups
VOLUME ["/var/www/html/public/backup"]
# Copy themes and create volume for themes
RUN mkdir /tmp/themes \
&& cp -r /var/www/html/public/themes/* /tmp/themes
VOLUME ["/var/www/html/public/themes"]
# Copy migration list and create volume for migrations
RUN mkdir /tmp/migrations \
&& cp /var/www/html/app/migrations/* /tmp/migrations