Add nginx dockerfile

This commit is contained in:
Philipp Lang 2023-07-20 23:45:06 +02:00
parent 4672f96a5f
commit 62d6730071
1 changed files with 8 additions and 0 deletions

View File

@ -1,3 +1,10 @@
FROM composer:2.2.7 as composer
WORKDIR /app
COPY . /app
RUN composer install --ignore-platform-reqs --no-dev
RUN php artisan telescope:publish
RUN php artisan horizon:publish
FROM node:17.9.0-slim as node
WORKDIR /app
COPY . /app
@ -6,6 +13,7 @@ RUN npm install && npm run prod && npm run img && rm -R node_modules
FROM nginx:1.21.6-alpine as nginx
WORKDIR /app
COPY --from=node /app /app
COPY --from=composer /app/public/vendor /app/public/vendor
COPY ./.docker/nginx/nginx.conf /etc/nginx/nginx.conf
EXPOSE 80