mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
Update docker config and add example compose file
This commit is contained in:
parent
8d3f792134
commit
3ac3fde2c6
5 changed files with 125 additions and 53 deletions
28
deploy/Dockerfile
Normal file
28
deploy/Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
# Stage 1: Build
|
||||
FROM joseluisq/php-fpm:8.4 AS build
|
||||
|
||||
RUN apk add --no-cache nodejs npm
|
||||
|
||||
WORKDIR /var/www/html
|
||||
COPY --chown=www-data:www-data . .
|
||||
|
||||
RUN chmod -R 775 /var/www/html/storage \
|
||||
&& chmod -R 775 /var/www/html/bootstrap/cache
|
||||
|
||||
RUN composer install --no-dev --prefer-dist \
|
||||
&& npm install \
|
||||
&& npm run build
|
||||
|
||||
RUN chown -R www-data:www-data /var/www/html/vendor \
|
||||
&& chmod -R 775 /var/www/html/vendor
|
||||
|
||||
# Stage 2: Deploy
|
||||
FROM joseluisq/php-fpm:8.4
|
||||
|
||||
COPY --from=build /var/www/html /var/www/html
|
||||
WORKDIR /var/www/html
|
||||
|
||||
VOLUME ["/var/www/html/storage/app"]
|
||||
|
||||
EXPOSE 9000
|
||||
CMD ["php", "artisan", "serve", "--host=0.0.0.0", "--port=9000", "--tries=1"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue