forked from savoirfairelinux/sous-chef
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
35 lines (28 loc) · 1.14 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
FROM --platform=linux/amd64 python:3.7
ENV PYTHONUNBUFFERED 1
# Install underlying Debian dependencies
RUN apt-get update && \
apt-get install curl gettext cron -y && \
apt-get clean
RUN apt-get install nodejs build-essential binutils libproj-dev gdal-bin -y && \
apt-get clean
# pyinotify is a development requirement to help with Django's runserver command.
RUN pip3 install --no-cache-dir pyinotify
RUN mkdir /code
WORKDIR /code
# We copy the strict minimum from the source code into the image so we can
# install the requirements and have that step cached by Docker.
COPY setup.py README.md /code/
RUN pip3 install -e .
# We add some development tool to make sure that contributors only need
# docker installed
COPY requirements-dev.txt /code/
RUN pip3 install -r requirements-dev.txt
# Add wait-for-it script for CI
# This script allow us to wait that DB is up&running before launching tests
COPY wait-for-it.sh /code/
ENV DJANGO_SETTINGS_MODULE="souschef.sous_chef.settings"
ENV SOUSCHEF_ENVIRONMENT_NAME="DEV"
CMD pip3 install -e . && \
python3 souschef/manage.py collectstatic --noinput && \
python3 souschef/manage.py runserver 0.0.0.0:8000