-
Notifications
You must be signed in to change notification settings - Fork 51
/
Dockerfile
65 lines (61 loc) · 1.64 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
FROM node:16 AS front
WORKDIR /client
ENV VUE_APP_NODE_ENV=production
ENV VUE_APP_API_ROOT=https://app.VUE_APP_MAIN_DOMAIN_PLACEHOLDER
ENV VUE_APP_MAIN_DOMAIN=VUE_APP_MAIN_DOMAIN_PLACEHOLDER
ENV VUE_APP_PUSHER_KEY=VUE_APP_PUSHER_KEY_PLACEHOLDER
COPY public/ ./public/
COPY src/ ./src/
COPY babel.config.js .firebaserc package.json yarn.lock vue.config.js _redirects _headers ./
RUN yarn install --network-timeout 100000
RUN yarn build
FROM node:16 AS back
ENV ENCRYPTION_KEY=
ENV ENCRYPTION_JWT_SECRET=
ENV APP_URL=
ENV PUSHER_APP_ID=
ENV PUSHER_KEY=
ENV PUSHER_SECRET=
ENV REDIS_HOST=redis
ENV REDIS_PORT=6379
ENV DB_HOST=postgres
ENV POSTGRES_USER=postgres
ENV POSTGRES_PASSWORD=postgres
ENV DB_NAME=ethernal
ENV DB_PORT=5432
ENV BULLBOARD_USERNAME=ethernal
ENV BULLBOARD_PASSWORD=ethernal
ENV SECRET=secret
ENV PORT=8888
ENV NODE_ENV=production
ENV CORS_DOMAIN=*
WORKDIR /app
COPY run/api ./api
COPY run/config ./config
COPY run/jobs ./jobs
COPY run/lib ./lib
COPY run/middlewares ./middlewares
COPY run/models ./models
COPY run/webhooks ./webhooks
COPY run/app.js .
COPY run/index.js .
COPY run/queues.js .
COPY run/scheduler.js .
COPY run/instrument.js .
COPY run/workers ./workers/
COPY run/package*.json ./
FROM back AS dev_back
RUN npm install
RUN npm install nodemon -g
FROM back AS prod_back
COPY ethernal-95a14-19f78a7e26cc.json ./ethernal-95a14-19f78a7e26cc.json
RUN npm ci --only=production
FROM back AS prod_all
RUN mkdir dist
COPY web_entrypoint.sh ./web_entrypoint.sh
RUN chmod +x ./web_entrypoint.sh
COPY --from=front /client/dist ./dist
COPY run/.sequelizerc ./
COPY run/migrations ./migrations
RUN npm ci --only=production
RUN npm install -g sequelize-cli