Skip to content

Commit b763ccb

Browse files
committed
Add permission to storage folder
1 parent 8d96ea3 commit b763ccb

File tree

3 files changed

+10
-5
lines changed

3 files changed

+10
-5
lines changed

Dockerfile.prod

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,6 @@ COPY --from=vuejs /app/public/js/ /var/www/html/public/js/
6363
COPY --from=vuejs /app/public/css/ /var/www/html/public/css/
6464
COPY --from=vuejs /app/mix-manifest.json /var/www/html/mix-manifest.json
6565

66-
RUN pwd && ls -la
67-
6866
RUN php artisan key:generate --ansi && php artisan storage:link && php artisan config:cache && php artisan route:cache
6967

7068

@@ -79,6 +77,13 @@ RUN chown -R www-data:www-data /var/www/html/storage \
7977
RUN mkdir -p storage/app \
8078
&& touch storage/app/db.sqlite
8179

80+
RUN chown -R www-data:www-data \
81+
/var/www/html \
82+
/var/www/html/storage \
83+
/var/www/html/bootstrap/cache
84+
85+
RUN chmod -R 775 /var/www/html/storage
86+
8287
VOLUME ["/var/www/html/storage", "/var/www/html/bootstrap/cache"]
8388

8489
EXPOSE 80

docker-compose.production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ services:
1717
networks:
1818
- back-tier
1919
mysql:
20-
image: mysql
20+
image: mysql:8.0
2121
container_name: mysql
2222
command: --default-authentication-plugin=mysql_native_password
2323
restart: always

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ services:
2626
- ${MYSQL_PORT}:3306
2727
volumes:
2828
- ./mysql/init.sql:/data/application/init.sql
29-
- mysql_data5:/var/lib/mysql
29+
- mysql_data:/var/lib/mysql
3030
client:
3131
build:
3232
context: .
@@ -38,4 +38,4 @@ services:
3838
depends_on:
3939
- "server"
4040
volumes:
41-
mysql_data5:
41+
mysql_data:

0 commit comments

Comments
 (0)