-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
45 lines (32 loc) · 1003 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
36
37
38
39
40
41
42
43
44
45
FROM ubuntu:artful
ARG XDG_CACHE_HOME=/cache
WORKDIR /var/app
RUN apt-get update -q \
&& apt-get install -q -y --no-install-recommends \
curl \
nodejs \
npm \
python-pip \
python-setuptools \
tzdata \
&& rm -rf /var/lib/apt/lists/*
RUN echo "SQLALCHEMY_DATABASE_URI=sqlite:////var/app/data/local.db" > .env
COPY \
config.py \
gulpfile.js \
healthcheck.sh \
manage.py \
package.json \
package-lock.json \
requirements.txt \
./
RUN pip install -r requirements.txt && rm requirements.txt
RUN npm config set cache "${XDG_CACHE_HOME}/npm" && npm install
COPY auth/assets auth/assets/
RUN node_modules/.bin/gulp && rm -rf auth/assets gulpfile.js node_modules package.json package-lock.json
COPY auth auth/
RUN rm -rf /tmp/* /usr/share/doc /usr/share/info
EXPOSE 5000
VOLUME ["/var/app/data", "/var/app/auth/static/uploads"]
ENTRYPOINT ["python", "manage.py"]
CMD ["runserver", "-h", "0.0.0.0", "-p", "5000"]