forked from skyportal/skyportal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (40 loc) · 1.37 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
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y curl build-essential software-properties-common && \
curl -sL https://deb.nodesource.com/setup_14.x | bash - && \
apt-get update && \
apt-get -y upgrade && \
apt-get install -y python3 python3-venv python3-dev \
libpq-dev supervisor \
git nginx nodejs postgresql-client vim htop && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
useradd --create-home --shell /bin/bash skyportal
RUN python3 -m venv /skyportal_env && \
\
bash -c "source /skyportal_env/bin/activate && \
pip install --upgrade pip wheel numpy"
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ADD . /skyportal
WORKDIR /skyportal
RUN bash -c "\
source /skyportal_env/bin/activate && \
make system_setup && \
\
./node_modules/.bin/webpack --mode=production --devtool none && \
rm -rf node_modules && \
\
chown -R skyportal.skyportal /skyportal_env && \
chown -R skyportal.skyportal /skyportal && \
\
mkdir -p /skyportal/static/thumbnails && \
chown -R skyportal.skyportal /skyportal/static/thumbnails && \
\
cp docker.yaml config.yaml"
USER skyportal
EXPOSE 5000
CMD bash -c "source /skyportal_env/bin/activate && \
(make log &) && \
make run_production"