diff --git a/debian/docker-compose.yml b/debian/docker-compose.yml index e5b96c0..2a9a34d 100644 --- a/debian/docker-compose.yml +++ b/debian/docker-compose.yml @@ -19,7 +19,7 @@ services: - ./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: @@ -33,11 +33,11 @@ services: image: nginx:alpine restart: unless-stopped ports: - - "80:80" + - "8012:80" 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: diff --git a/debian/scripts/init.sh b/debian/scripts/init.sh index d62cb94..d231146 100755 --- a/debian/scripts/init.sh +++ b/debian/scripts/init.sh @@ -54,13 +54,13 @@ fi # Clean the existing public/ directory but exclude .js and .css files if [ -d /var/www/html/public ]; then - echo "Cleaning up stale files in public/ directory, retaining .js and .css files..." - find /var/www/html/public -type f ! -name '*.js' ! -name '*.css' -exec rm -f {} \; + 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/public/ +cp -r /image-original/public/* /var/www/html/ # Clear and cache config in production