forked from maccyber/bigfive-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
41 lines (30 loc) · 790 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
###########################################################
#
# Dockerfile for bigfive-web
#
###########################################################
# Setting the base to nodejs 7
FROM mhart/alpine-node:7
# Maintainer
MAINTAINER Jonas Enge
#### Begin setup ####
# Extra tools for native dependencies
RUN apk add --no-cache make gcc g++ python
# Bundle app source
COPY . /src
# Change working directory
WORKDIR "/src"
# Env variables
ENV SERVER_PORT 3000
ENV DATA_URL https://questions.bigfive.maccyber.io/getQuestions
ENV GENERATOR_URL https://generator.bigfive.maccyber.io
ENV DEFAULT_LANG en
ENV DEFAULT_LIMIT 5
ENV DEFAULT_TEST 50
# Install dependencies
RUN npm install --production
RUN npm run build
# Expose 3000
EXPOSE ${SERVER_PORT}
# Startup
ENTRYPOINT npm run start