forked from vas3k/vas3k.club
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
30 lines (25 loc) · 775 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
FROM ubuntu:20.04
ENV MODE dev
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install --no-install-recommends -yq \
build-essential \
python3 \
python3-dev \
python3-pip \
libpq-dev \
gdal-bin \
libgdal-dev \
make \
npm \
cron \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY . /app
COPY etc/crontab /etc/crontab
RUN chmod 600 /etc/crontab
RUN cd frontend && npm install && npm run build && cd ..
RUN pip3 install pipenv==2021.5.29
RUN sh -c 'if [ "$MODE" = 'production' ]; then pipenv lock --keep-outdated --requirements > requirements.txt; fi'
RUN sh -c 'if [ "$MODE" = 'dev' ]; then pipenv lock --dev --requirements > requirements.txt; fi'
RUN pip3 install -r requirements.txt