Add nginx dockerfile
This commit is contained in:
parent
4672f96a5f
commit
62d6730071
|
@ -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
|
FROM node:17.9.0-slim as node
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /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
|
FROM nginx:1.21.6-alpine as nginx
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=node /app /app
|
COPY --from=node /app /app
|
||||||
|
COPY --from=composer /app/public/vendor /app/public/vendor
|
||||||
COPY ./.docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
COPY ./.docker/nginx/nginx.conf /etc/nginx/nginx.conf
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue