adrema/.docker/nginx.Dockerfile

23 lines
568 B
Docker
Raw Normal View History

2023-07-20 23:45:06 +02:00
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
2024-07-18 00:59:15 +02:00
FROM node:20.15.0-slim as node
2022-06-10 02:00:46 +02:00
WORKDIR /app
COPY . /app
2023-05-15 19:48:37 +02:00
RUN npm install && npm run prod && npm run img && rm -R node_modules
2022-06-10 02:00:46 +02:00
2023-05-15 19:48:37 +02:00
FROM nginx:1.21.6-alpine as nginx
WORKDIR /app
2023-07-20 22:58:51 +02:00
COPY --from=node /app /app
2023-07-20 23:45:06 +02:00
COPY --from=composer /app/public/vendor /app/public/vendor
2023-07-20 16:29:20 +02:00
COPY ./.docker/nginx/nginx.conf /etc/nginx/nginx.conf
2023-05-15 19:48:37 +02:00
EXPOSE 80
2022-11-22 14:39:13 +01:00
2024-01-01 22:39:47 +01:00
VOLUME ["/app/public/storage"]
2023-07-20 23:19:59 +02:00
2023-05-15 19:48:37 +02:00
CMD ["nginx", "-g", "daemon off;"]