-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
42 lines (36 loc) · 977 Bytes
/
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
FROM node:15.10.0-alpine3.10
ARG NODE_ENV=
ARG APP_PORT=4000
ARG DATABASE=mavidurak
ARG DATABASE_USERNAME=root
ARG DATABASE_PASSWORD=123456
ARG DATABASE_HOST=localhost
ARG API_PATH=http://localhost:4000
ARG DASHBOARD_UI_PATH=http://localhost:8080
ARG EMAIL_HOST=smtp.gmail.com
ARG EMAIL_PORT=465
ARG EMAIL_SECURE=true
ARG EMAIL_USER=
ARG EMAIL_PASSWORD=
# environment variables
ENV NODE_ENV=$NODE_ENV
ENV APP_PORT=$APP_PORT
ENV DATABASE=$DATABASE
ENV DATABASE_USERNAME=$DATABASE_USERNAME
ENV DATABASE_PASSWORD=$DATABASE_PASSWORD
ENV DATABASE_HOST=$DATABASE_HOST
ENV API_PATH=$API_PATH
ENV DASHBOARD_UI_PATH=$DASHBOARD_UI_PATH
ENV EMAIL_HOST=$EMAIL_HOST
ENV EMAIL_PORT=$EMAIL_PORT
ENV EMAIL_SECURE=$EMAIL_SECURE
ENV EMAIL_USER=$EMAIL_USER
ENV EMAIL_PASSWORD=$EMAIL_PASSWORD
# create project directory
WORKDIR /usr/src/mentor-api
# bundle app source
COPY . .
# install dependencies
RUN NODE_ENV=development npm install
EXPOSE $app_port
CMD ["npm", "run", "start:migrate"]