forked from HSLdevcom/digitransit-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (39 loc) · 1.1 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
FROM node:10
MAINTAINER Reittiopas version: 0.1
EXPOSE 8080
ENV \
# Where the app is built and run inside the docker fs \
WORK=/opt/digitransit-ui \
# Used indirectly for saving npm logs etc. \
HOME=/opt/digitransit-ui \
# App specific settings to override when the image is run \
SENTRY_DSN='' \
SENTRY_SECRET_DSN='' \
PORT=8080 \
API_URL='' \
MAP_URL='' \
OTP_URL='' \
GEOCODING_BASE_URL='' \
APP_PATH='' \
CONFIG='' \
NODE_ENV='' \
# setting a non-empty default value for NODE_OPTS
# if you don't do this then yarn/node seem to think that you want to
# execute a file called "" (empty string) and doesn't start the server
# https://github.com/HSLdevcom/digitransit-ui/issues/4155
#
# the --title option just sets the harmless property process.title
# https://nodejs.org/api/cli.html#cli_title_title
NODE_OPTS='--title=digitransit-ui' \
RELAY_FETCH_TIMEOUT='' \
ASSET_URL='' \
STATIC_MESSAGE_URL=''
WORKDIR ${WORK}
ADD . ${WORK}
RUN \
yarn && \
yarn setup && \
yarn build && \
rm -rf static docs test /tmp/* .cache && \
yarn cache clean --all
CMD yarn run start