diff --git a/docker-compose.yml b/docker-compose.yml index 1a28b46..405f506 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: ports: - "8080:80" volumes: - - "./plants:/var/www/html/public/img" - - "./plants_logs:/var/www/html/app/logs" + - app_images:/var/www/html/public/img + - app_logs:/var/www/html/app/logs environment: APP_DEBUG: "true" APP_LANG: "en" @@ -43,3 +43,5 @@ services: volumes: db_data: + app_images: + app_logs: diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh index f1786c1..58aa90c 100644 --- a/docker-entrypoint.sh +++ b/docker-entrypoint.sh @@ -148,7 +148,7 @@ php asatru migrate:fresh # Check if admin user exists and create it if not. add_admin_user_if_missing -# copy default images +# Copy default images cp /tmp/img/* /var/www/html/public/img # Set permissions to folders for file upload diff --git a/dockerfile b/dockerfile index 9042c85..182daa0 100644 --- a/dockerfile +++ b/dockerfile @@ -25,10 +25,10 @@ COPY . /var/www/html # copy default files in /public/img so they can be copied if needed in entrypoint RUN mkdir /tmp/img RUN cp /var/www/html/public/img/* /tmp/img -VOLUME /var/www/html/public/img +VOLUME ["/var/www/html/public/img"] # Create volume for logs -VOLUME /var/www/html/app/logs +VOLUME ["/var/www/html/app/logs"] # Copy the PHP overrides COPY ./99-php.ini /usr/local/etc/php/conf.d/