fix: ensure permissions are set and storage dir is scaffolded
This commit is contained in:
+9
-10
@@ -3,8 +3,6 @@ FROM php:8.3-fpm
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ENV APP_NAME=Investbrain
|
||||
ENV VITE_APP_NAME=Investbrain
|
||||
ENV APP_DEBUG=true
|
||||
ENV SELF_HOSTED=true
|
||||
|
||||
# Set the working directory
|
||||
COPY . /var/app
|
||||
@@ -39,21 +37,23 @@ RUN rm /etc/nginx/sites-enabled/default \
|
||||
&& rm -rf /var/www/html \
|
||||
&& ln -s /var/app /var/www/app
|
||||
|
||||
# Set permissions and ensure www-data has a shell available
|
||||
RUN chown -R www-data:www-data . \
|
||||
&& chmod -R 775 ./storage \
|
||||
&& chmod +x ./docker/entrypoint.sh \
|
||||
&& usermod -s /bin/bash www-data
|
||||
|
||||
# Install Composer and Node.js Install PHP dependencies and build front end assets
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
&& composer install --no-scripts --optimize-autoloader \
|
||||
&& npm install && npm run build
|
||||
&& npm install && npm run build \
|
||||
&& rm -rf node_modules
|
||||
|
||||
# Copy over configs
|
||||
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY ./docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# Set permissions and ensure www-data has a shell available
|
||||
RUN chown -R www-data:www-data . \
|
||||
&& chmod -R 775 ./storage \
|
||||
&& chmod +x ./docker/entrypoint.sh
|
||||
|
||||
# && usermod -s /bin/bash www-data
|
||||
|
||||
# Serve on port 80
|
||||
EXPOSE 80
|
||||
|
||||
@@ -62,4 +62,3 @@ HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD curl -f http://localhos
|
||||
|
||||
# Run everything else
|
||||
ENTRYPOINT ["/bin/bash", "./docker/entrypoint.sh"]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user