-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (23 loc) · 788 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (23 loc) · 788 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
FROM python:3.8
# set environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
# install Poetry
RUN curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | POETRY_HOME=/opt/poetry python && \
cd /usr/local/bin && \
ln -s /opt/poetry/bin/poetry && \
poetry config virtualenvs.create false
# install dependencies
# Copy using poetry.lock* in case it doesn't exist yet
COPY pyproject.toml poetry.lock* /
RUN poetry install --no-root --no-dev
# copy entrypoint.sh
COPY ./entrypoint.sh .
# entrypoint permissions
RUN chmod +x /entrypoint.sh
COPY . /opt/weddinghouse/
WORKDIR /opt/weddinghouse/app
RUN python manage.py makemigrations
RUN python manage.py migrate
EXPOSE 8000
#ENTRYPOINT ["/opt/weddinghouse/entrypoint.sh"]