-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
47 lines (32 loc) · 1.07 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
FROM mhart/alpine-node:15 as build
ARG SITE=boilerplate
ARG ROLE
ARG ENV_MODE
ENV ENV_MODE $ENV_MODE
ARG DATABASE_URL
ENV DATABASE_URL $DATABASE_URL
ARG SUDO_PASSWORD
ENV SUDO_PASSWORD $SUDO_PASSWORD
# ARG endpoint
# ENV endpoint $endpoint
# ARG PUBLIC_URL
# ENV PUBLIC_URL $PUBLIC_URL
RUN apk add bash
RUN apk add mc
RUN apk add curl
RUN apk add python2
RUN apk add python3
RUN apk add make
RUN apk add g++
RUN apk add git
# RUN apk add --upgrade --no-cache vips-dev build-base \
# --repository https://alpine.global.ssl.fastly.net/alpine/v3.10/community/
WORKDIR /www/${SITE}/
COPY ./ .
# Установку зависимостей нельзя переносить в entrypoint,
# потому что тот скрипт срабатывает уже тогда, когда контейнер создан и заменен имеющийся (если уже был запущен)
RUN yarn install --ignore-engines
# Deploy prisma migrations into database
RUN yarn prisma:deploy
RUN yarn generate:types
RUN if [ "$ENV_MODE" = "production" ] ; then yarn build ; fi