-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.fly
38 lines (28 loc) · 879 Bytes
/
Dockerfile.fly
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
FROM python:3.11
WORKDIR /app
COPY requirements.txt requirements_dev.txt requirements.lock /app/
COPY apps /app/apps/
COPY front /app/front/
COPY static /app/static/
# Install Python dependencies
RUN \
apt-get update && apt-get upgrade -y && \
apt-get install -y spatialite-bin libsqlite3-mod-spatialite \
binutils libproj-dev gdal-bin nodejs npm && \
pip install -U pip && pip install uwsgi && \
pip install -r /app/requirements_dev.txt && \
rm -rf /var/lib/apt/lists/*
# Build Frontend
RUN \
cd /app/front/ && \
npm install && \
npm run build
ENV STATIC_ROOT "/app/staticfiles"
ENV SECRET_KEY "this is a secret key for building purposes"
# Collect static
RUN \
cd /app/apps/ && \
python3 manage.py collectstatic --noinput
CMD cd /app/apps && \
python3 manage.py migrate --noinput && \
uwsgi --ini /app/apps/interfaces/public/uwsgi.ini