feat: implement dockerfiles and improve cors configuration
This commit is contained in:
16
web/Dockerfile
Normal file
16
web/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
# Builder stage
|
||||
FROM node:16-alpine AS builder
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn install --production --frozen-lockfile
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
|
||||
# Runtime stage
|
||||
FROM node:16-alpine
|
||||
WORKDIR /app
|
||||
COPY --from=builder /app/build ./build
|
||||
RUN yarn global add serve
|
||||
ENV PORT=3000
|
||||
EXPOSE 3000
|
||||
CMD ["sh", "-c", "serve -s build -l ${PORT}"]
|
||||
Reference in New Issue
Block a user