Dockerfile 661 Bytes
Newer Older
Chif Gergő committed
1 2 3 4 5 6 7 8
FROM python:3.6
WORKDIR /usr/cloud/portal 
SHELL ["/bin/bash", "-c"]
# Install pipenv
RUN pip install pipenv
# Open 8000 port
EXPOSE 8000/tcp
# Copy files necessary for install dependencies
9
COPY Pipfile* .env ./
Chif Gergő committed
10
# This env variable needed to pipenv find .env file
11
ENV PIPENV_DOTENV_LOCATION=/usr/cloud/portal/.env
12
ENV DJANGO_SETTINGS_MODULE=recircle.settings.local
13 14
  # Install dependencies
RUN pipenv install -d
Chif Gergő committed
15 16
# Copy sources
COPY ./recircle ./recircle
17 18
# Set working dir where the manage.py found
WORKDIR /usr/cloud/portal/recircle
Chif Gergő committed
19
# Migrate and start server
20
CMD pipenv run python manage.py migrate \
21
    && pipenv run python manage.py runserver 0.0.0.0:8000
Chif Gergő committed
22