forked from johndatserakis/koa-vue-notes-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-production
60 lines (51 loc) · 1.17 KB
/
Dockerfile-production
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
FROM node:10
ARG APP_EMAIL
ARG APP_ENV
ARG APP_NAME
ARG APP_PORT
ARG APP_URL
ARG AWS_ACCESS_KEY_ID
ARG AWS_SECRET_ACCESS_KEY
ARG DB_DATABASE
ARG DB_HOST
ARG DB_PASSWORD
ARG DB_PORT
ARG DB_USER
ARG ECR_REGISTRY
ARG ECR_REPOSITORY
ARG IMAGE_TAG
ARG JWT_ACCESS_TOKEN_EXP
ARG JWT_SECRET
ARG NODE_ENV
ARG RECAPTCHA_SECRET
ARG SENDGRID_API_KEY
ARG STRIPE_SECRET_KEY
ENV APP_EMAIL=$APP_EMAIL
ENV APP_ENV=$APP_ENV
ENV APP_NAME=$APP_NAME
ENV APP_PORT=$APP_PORT
ENV APP_URL=$APP_URL
ENV AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID
ENV AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY
ENV DB_DATABASE=$DB_DATABASE
ENV DB_HOST=$DB_HOST
ENV DB_PASSWORD=$DB_PASSWORD
ENV DB_PORT=$DB_PORT
ENV DB_USER=$DB_USER
ENV ECR_REGISTRY=$ECR_REGISTRY
ENV ECR_REPOSITORY=$ECR_REPOSITORY
ENV IMAGE_TAG=$IMAGE_TAG
ENV JWT_ACCESS_TOKEN_EXP=$JWT_ACCESS_TOKEN_EXP
ENV JWT_SECRET=$JWT_SECRET
ENV NODE_ENV=$NODE_ENV
ENV RECAPTCHA_SECRET=$RECAPTCHA_SECRET
ENV SENDGRID_API_KEY=$SENDGRID_API_KEY
ENV STRIPE_SECRET_KEY=$STRIPE_SECRET_KEY
WORKDIR /usr/src/app
COPY package*.json ./
# We want the devDependencies here
RUN npm --production=false install
RUN npm install knex -g
COPY . .
RUN npm run build
CMD [ "node", "./dist/src/app.js" ]