1 |
7f244939
|
Lukáš Vlček
|
FROM node:lts as build
|
2 |
|
|
|
3 |
|
|
ENV NPM_CONFIG_LOGLEVEL warn
|
4 |
|
|
WORKDIR app
|
5 |
|
|
|
6 |
|
|
COPY package.json package.json
|
7 |
|
|
COPY yarn.lock yarn.lock
|
8 |
c9fb3022
|
Miloslav Konopik
|
RUN yarn install --pure-lockfile --network-timeout 1000000
|
9 |
7f244939
|
Lukáš Vlček
|
|
10 |
|
|
COPY . .
|
11 |
|
|
|
12 |
|
|
RUN npx browserslist@latest --update-db
|
13 |
|
|
RUN yarn build
|
14 |
|
|
|
15 |
|
|
FROM node:lts
|
16 |
|
|
WORKDIR app
|
17 |
|
|
|
18 |
|
|
COPY package.json package.json
|
19 |
5f4331ba
|
Lukáš Vlček
|
COPY next.config.js next.config.js
|
20 |
|
|
|
21 |
7f244939
|
Lukáš Vlček
|
COPY yarn.lock yarn.lock
|
22 |
c9fb3022
|
Miloslav Konopik
|
RUN yarn install --pure-lockfile --production --network-timeout 1000000
|
23 |
7f244939
|
Lukáš Vlček
|
|
24 |
|
|
COPY --from=build app/.next .next
|
25 |
|
|
COPY --from=build app/public public
|
26 |
|
|
|
27 |
|
|
ENV NPM_CONFIG_LOGLEVEL warn
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
ARG BACKEND_URL=$BACKEND_URL
|
31 |
|
|
ENV BACKEND_URL=$BACKEND_URL
|
32 |
|
|
|
33 |
|
|
EXPOSE 5000
|
34 |
|
|
|
35 |
c9fb3022
|
Miloslav Konopik
|
CMD yarn start -p 5000
|