-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (34 loc) · 1.08 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/engine/reference/builder/
ARG NODE_VERSION=16.20.1
################################################################################
# Use node image for base image for all stages.
FROM node:${NODE_VERSION}-alpine as base
# Set working directory for all build stages.
WORKDIR /usr/src/app
ENV SKIP_ENV_VALIDATION=true
################################################################################
# Create a stage for building the application.
FROM base as build
ENV PORT=8080
RUN corepack prepare [email protected]
RUN corepack enable yarn
COPY ./package.json ./yarn.lock ./
RUN yarn install
COPY . .
RUN yarn prisma migrate reset --force
CMD ["yarn", "dev"]
# FROM base as final
#
# ENV NODE_ENV production
#
#
# USER node
#
# COPY --from=build /usr/src/app/.next/standalone ./
# COPY --from=build /usr/src/app/.next/static ./.next/static
# COPY --from=build /usr/src/app/prisma ./prisma
#
# CMD node server.js