🐳 new Dockerfile
This commit is contained in:
parent
2cdd1cd961
commit
33d8622eb2
16
Dockerfile
16
Dockerfile
|
@ -1,6 +1,12 @@
|
|||
FROM node:15.4.0-alpine3.12
|
||||
WORKDIR /app
|
||||
RUN npm i -g pnpm
|
||||
COPY package.json index.html ./
|
||||
RUN pnpm i
|
||||
COPY src ./src
|
||||
COPY public ./public
|
||||
RUN pnpm run build
|
||||
# final image
|
||||
FROM fholzer/nginx-brotli:v1.19.1
|
||||
ENV APP_CONF="config={}"
|
||||
# TODO: buildstep
|
||||
COPY ./dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf.template
|
||||
# COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --from=0 /app/dist /usr/share/nginx/html
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
|
@ -1,9 +1,8 @@
|
|||
version: '3'
|
||||
version: "3"
|
||||
services:
|
||||
httpd:
|
||||
build: .
|
||||
environment:
|
||||
- APP_CONF=config={"baseUrl":"http://localhost:8081"}
|
||||
command: ["sh", "-c", "envsubst < /etc/nginx/conf.d/default.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"]
|
||||
volumes:
|
||||
- ./public/env.sample.js:/usr/share/nginx/html/env.js
|
||||
ports:
|
||||
- 4050:80
|
||||
- 4050:80
|
||||
|
|
Loading…
Reference in New Issue