-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
96 lines (71 loc) · 2.11 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
FROM thinxcloud/base:alpine
LABEL maintainer="Matej Sychra <[email protected]>"
LABEL name="THiNX API" version="1.9.2578"
ARG DEBIAN_FRONTEND=noninteractive
ARG THINX_HOSTNAME
ENV THINX_HOSTNAME=${THINX_HOSTNAME}
ARG THINX_OWNER_EMAIL
ENV THINX_OWNER_EMAIL=${THINX_OWNER_EMAIL}
ARG COUCHDB_USER
ENV COUCHDB_USER=${COUCHDB_USER}
ARG COUCHDB_PASS
ENV COUCHDB_PASS=${COUCHDB_PASS}
ARG REDIS_PASSWORD
ENV REDIS_PASSWORD=${REDIS_PASSWORD}
ARG CODACY_PROJECT_TOKEN
ENV CODACY_PROJECT_TOKEN=${CODACY_PROJECT_TOKEN}
ARG ROLLBAR_ACCESS_TOKEN
ENV ROLLBAR_ACCESS_TOKEN=${ROLLBAR_ACCESS_TOKEN}
ARG ROLLBAR_ENVIRONMENT
ARG ROLLBAR_ENVIRONMENT=${ROLLBAR_ENVIRONMENT}
ARG AQUA_SEC_TOKEN
ENV AQUA_SEC_TOKEN=${AQUA_SEC_TOKEN}
ARG SNYK_TOKEN
ENV SNYK_TOKEN=${SNYK_TOKEN}
ARG ENVIRONMENT
ENV ENVIRONMENT=${ENVIRONMENT}
ARG NODE_ENV=production
ENV NODE_ENV=${NODE_ENV}
ARG REVISION
ENV REVISION=${REVISION}
ARG GOOGLE_OAUTH_ID
ENV GOOGLE_OAUTH_ID=${GOOGLE_OAUTH_ID}
ARG GOOGLE_OAUTH_SECRET
ENV GOOGLE_OAUTH_SECRET=${GOOGLE_OAUTH_SECRET}
ARG GITHUB_CLIENT_ID
ENV GITHUB_CLIENT_ID=${GITHUB_CLIENT_ID}
ARG GITHUB_CLIENT_SECRET
ENV GITHUB_CLIENT_SECRET=${GITHUB_CLIENT_SECRET}
ARG GITHUB_ACCESS_TOKEN
ENV GITHUB_ACCESS_TOKEN={GITHUB_ACCESS_TOKEN}
ARG SLACK_BOT_TOKEN
ENV SLACK_BOT_TOKEN=${SLACK_BOT_TOKEN}
ARG SLACK_CLIENT_ID
ENV SLACK_CLIENT_ID=${SLACK_CLIENT_ID}
ARG SLACK_CLIENT_SECRET
ENV SLACK_CLIENT_SECRET=${SLACK_CLIENT_SECRET}
ARG SLACK_WEBHOOK
ENV SLACK_WEBHOOK=${SLACK_WEBHOOK}
ARG ENTERPRISE
ENV ENTERPRISE=${ENTERPRISE}
ARG WORKER_SECRET
ENV WORKER_SECRET=${WORKER_SECRET}
ARG MAILGUN_API_KEY
ENV MAILGUN_API_KEY=${MAILGUN_API_KEY}
# Create app directory
WORKDIR /opt/thinx/thinx-device-api
# Install app dependencies
COPY package.json ./
RUN npm install -g [email protected] \
&& npm install --only-prod .
# THiNX Web & Device API (HTTP)
EXPOSE 7442
# THiNX Device API (HTTPS)
EXPOSE 7443
# GitLab Webbook (optional, moved to HTTPS)
EXPOSE 9002
# Copy app source code
COPY . .
# TODO: Implement Snyk Container Scanning here in addition to DockerHub manual scans...
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
ENTRYPOINT [ "/docker-entrypoint.sh" ]