forked from drugis/gemtc-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
35 lines (25 loc) · 888 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
FROM phusion/baseimage:master
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
RUN apt update
RUN apt upgrade -y -f -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"
# Install nodejs
RUN apt install -y curl
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
RUN apt install -y nodejs git
RUN npm install -g yarn
RUN npm install -g forever
RUN useradd --create-home --home /var/lib/gemtc gemtc
COPY . /var/lib/gemtc
RUN chown -R gemtc.gemtc /var/lib/gemtc
USER gemtc
WORKDIR /var/lib/gemtc
ENV HOME /var/lib/gemtc
RUN yarn
ARG MATOMO_VERSION
RUN if [ "$MATOMO_VERSION" != "" ] ; then export MATOMO_VERSION=$MATOMO_VERSION ; else export MATOMO_VERSION='Test' ; fi
ARG WEBPACK_COMMAND
RUN if [ "$WEBPACK_COMMAND" != "" ] ; then npm run $WEBPACK_COMMAND ; else npm run build-prod ; fi
EXPOSE 3001
CMD ["forever", "gemtc.js"]