-
Notifications
You must be signed in to change notification settings - Fork 26
/
Dockerfile
62 lines (48 loc) · 1.2 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
FROM ubuntu:16.04
LABEL maintainer="Seth Fitzsimmons <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
RUN \
apt update \
&& apt upgrade -y \
&& apt install -y --no-install-recommends \
apt-transport-https \
curl \
software-properties-common \
&& curl -sf https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& add-apt-repository -y -u -s "deb https://deb.nodesource.com/node_6.x $(lsb_release -c -s) main" \
&& apt install -y --no-install-recommends \
build-essential \
default-jre-headless \
git \
nodejs \
python \
python-dev \
python-pip \
python-setuptools \
python-wheel \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN \
npm install -g yarn \
&& rm -rf /root/.npm
COPY requirements.txt /app/requirements.txt
WORKDIR /app
RUN \
pip install -r requirements.txt
COPY package.json /app/package.json
RUN \
yarn \
&& rm -rf /root/.cache/yarn
COPY . /app/
RUN \
cd frontend && yarn \
&& yarn build
RUN \
git submodule update --init \
&& useradd omkserver -m \
&& chown -R omkserver:omkserver /app/data
USER omkserver
VOLUME ["/app/data"]
EXPOSE 3210
ENV NODE_ENV production
CMD ["node", "server.js"]