-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-turtle
37 lines (28 loc) · 1 KB
/
Dockerfile-turtle
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
# Use an official Python runtime as a parent image
FROM python:3.9
LABEL maintainer="[email protected]"
# Set environment varibles
ENV PYTHONUNBUFFERED 1
ENV DJANGO_ENV dev
COPY ./requirements.txt /code/requirements.txt
RUN pip install --upgrade pip
# Install any needed packages specified in requirements.txt
RUN pip install -r /code/requirements.txt
RUN pip install gunicorn
# Copy the current directory contents into the container at /code/
COPY . /code/
# COPY ./static/ /code/understory/static/
RUN sed -i 's/\r$//g' /code/start
RUN chmod +x /code/start
# Set environment such that the understory/settings/production.py is used.
ENV DJANGO_SETTINGS_MODULE=understory.settings.production
# Set the working directory to /code/
WORKDIR /code/
RUN python manage.py migrate
# RUN python manage.py collectstatic --noinput
RUN useradd wagtail
RUN chown -R wagtail /code
USER wagtail
# Handle from docker-compose.yml and 'start'
# EXPOSE 8000
# CMD exec gunicorn understory.wsgi:application --bind 0.0.0.0:8004 --workers 3