Compare commits

...

6 Commits

Author SHA1 Message Date
David Bomba
5d5c036175 Merge pull request #667 from turbo124/debian
Patches for copying files
2024-12-03 15:01:54 +11:00
David Bomba
d5ed1935f7 set port 80 2024-12-03 15:01:08 +11:00
David Bomba
5e40e34943 run local init.sh file 2024-12-03 14:59:41 +11:00
David Bomba
c4e1d0e3a5 Updates for copy files 2024-12-03 14:49:58 +11:00
David Bomba
84dcb8caab Merge pull request #665 from turbo124/debian
Update dockerfile
2024-12-03 12:40:39 +11:00
David Bomba
f281b33ea1 Update dockerfile 2024-11-30 22:05:28 +11:00
3 changed files with 23 additions and 2 deletions

3
debian/Dockerfile vendored
View File

@@ -136,6 +136,9 @@ RUN mkdir -p \
RUN cp /var/www/html/resources/views/react/index.blade.php /var/www/html/public/index.html
# copy the public/ directory into a separate folder so that we can overwrite the volume later via the entrypoint
RUN mkdir -p /image-original/public && cp -r /var/www/html/public /image-original/public
# Set permissions
RUN chown -R www-data:www-data \
/var/www/html/storage \

View File

@@ -13,13 +13,14 @@ services:
env_file:
- ./.env
volumes:
- ./scripts/init.sh:/usr/local/bin/init.sh
- ./.env:/var/www/html/.env:ro
- ./php/php.ini:/usr/local/etc/php/conf.d/zzz-php.ini:ro
- ./php/php-fpm.conf:/usr/local/etc/php-fpm.d/zzz-php-fpm.conf:ro
- ./supervisor/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf:ro
- app_storage:/var/www/html/storage
- app_cache:/var/www/html/bootstrap/cache
- image_public:/var/www/html/public:ro
- image_public:/var/www/html/public
networks:
- app-network
depends_on:
@@ -37,7 +38,7 @@ services:
volumes:
- ./nginx:/etc/nginx/conf.d:ro
- app_storage:/var/www/html/storage:ro
- image_public:/var/www/html/public:ro
- image_public:/var/www/html/public
networks:
- app-network
depends_on:

View File

@@ -46,6 +46,23 @@ chmod -R 775 \
chown -R www-data:www-data /var/www/html/storage
# Ensure symlink for storage/app/public
if [ ! -L /var/www/html/public/storage ]; then
echo "Creating symlink for storage/app/public..."
ln -sfn /var/www/html/storage/app/public /var/www/html/public/storage
fi
# Clean the existing public/ directory but exclude .js and .css files
if [ -d /var/www/html/public ]; then
echo "Cleaning up .js and .css files in public/ directory..."
find /var/www/html/public -type f \( -name '*.js' -o -name '*.css' \) -exec rm -f {} \;
fi
# Copy the public/ directory from the image to the mounted volume
echo "Copying public/ directory from image to volume..."
cp -r /image-original/public/* /var/www/html/
# Clear and cache config in production
if [ "$APP_ENV" = "production" ]; then
gosu www-data php artisan config:cache