fix: move storage:link to dockerfile
This commit is contained in:
+3
-5
@@ -47,13 +47,11 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
|
|||||||
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
|
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||||
|
|
||||||
# Set permissions and ensure www-data has a shell available
|
# Set permissions and link storage
|
||||||
RUN chown -R www-data:www-data . \
|
RUN php artisan storage:link \
|
||||||
&& chmod -R 775 ./storage \
|
&& chown -R www-data:www-data . \
|
||||||
&& chmod +x ./docker/entrypoint.sh
|
&& chmod +x ./docker/entrypoint.sh
|
||||||
|
|
||||||
# && usermod -s /bin/bash www-data
|
|
||||||
|
|
||||||
# Serve on port 80
|
# Serve on port 80
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|||||||
@@ -16,15 +16,6 @@ chown -R www-data:www-data storage
|
|||||||
|
|
||||||
echo -e "\n > Storage directory scaffolding is OK... "
|
echo -e "\n > Storage directory scaffolding is OK... "
|
||||||
|
|
||||||
# Ensure storage symlink exists
|
|
||||||
if [[ ! -L "public/storage" ]]; then
|
|
||||||
echo -e "\n > Creating symbolic link for app public storage... "
|
|
||||||
|
|
||||||
php artisan storage:link
|
|
||||||
else
|
|
||||||
echo -e "\n > Storage linked... "
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Ensure app key is generated
|
# Ensure app key is generated
|
||||||
if [[ -z "$APP_KEY" ]]; then
|
if [[ -z "$APP_KEY" ]]; then
|
||||||
echo -e "\n > Oops! The required APP_KEY configuration is missing in your environment! "
|
echo -e "\n > Oops! The required APP_KEY configuration is missing in your environment! "
|
||||||
|
|||||||
Reference in New Issue
Block a user