2024-01-05 17:38:58 +01:00
|
|
|
FROM python:3.11-slim-bullseye
|
2022-02-04 15:17:08 +01:00
|
|
|
ENV PYTHONUNBUFFERED 1
|
|
|
|
|
|
|
|
WORKDIR /konova
|
|
|
|
|
|
|
|
# Install some dependencies
|
|
|
|
RUN apt update
|
2022-04-25 16:07:38 +02:00
|
|
|
RUN apt install -y gdal-bin redis-server nginx
|
2022-02-04 15:17:08 +01:00
|
|
|
|
2022-04-26 08:55:07 +02:00
|
|
|
# Copy requirements file into workspace and install all dependencies
|
2022-02-04 15:17:08 +01:00
|
|
|
COPY ./requirements.txt /konova/
|
|
|
|
RUN pip install --upgrade pip
|
|
|
|
RUN pip install -r requirements.txt
|
|
|
|
|
2022-04-26 08:55:07 +02:00
|
|
|
# Remove nginx default configuration and replace with own configuration
|
2022-04-25 16:07:38 +02:00
|
|
|
RUN rm /etc/nginx/sites-enabled/default
|
2022-04-26 08:55:07 +02:00
|
|
|
COPY ./nginx.conf /etc/nginx/conf.d
|
|
|
|
|
|
|
|
# Copy rest of project into workspace
|
2022-02-04 15:17:08 +01:00
|
|
|
COPY . /konova/
|
|
|
|
|
|
|
|
# Move static files in designated folder
|
|
|
|
RUN python manage.py collectstatic --noinput
|
|
|
|
|