-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
38 lines (31 loc) · 818 Bytes
/
Dockerfile
File metadata and controls
38 lines (31 loc) · 818 Bytes
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.10
WORKDIR /app
RUN apt-get update && apt-get install
RUN apt-get install -y \
dos2unix \
libpq-dev \
sqlite3 \
libmariadb-dev-compat \
libmariadb-dev \
gcc \
&& apt-get clean
ENV SECRET_KEY=asdaaskdw9u2r4lfkjd32
ENV DEBUG=True
ENV ALLOWED_HOSTS='*'
ENV DB_URL=sqlite:///db.sqlite3
ENV BASE_URL=/
ENV EMAIL_HOST=localhost
ENV EMAIL_PORT=5822
ENV EMAIL_HOST_USER=admin
ENV EMAIL_HOST_PASSWORD=somepass
ENV EMAIL_USE_TLS=false
ENV EMAIL_USE_SSL=false
RUN python -m pip install --upgrade pip
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .
RUN ./manage.py makemigrations
# I'm not sure why this does not import any data into the database file
# but I'll leave it here in case someone would figure it out.
RUN ./manage.py migrate
# RUN ./manage.py loaddata dump.json