diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..21b0081 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM python:3.6-alpine + +WORKDIR /app +EXPOSE 8000 +VOLUME /app/staticfiles +ENV DATABASE_URL postgres://postgresql:postgresql@db:5432/workout + +RUN pip3 install pipenv +COPY Pipfile Pipfile.lock ./ +RUN pipenv install + +COPY . ./ + +RUN chmod +x bash/run-prod.sh +CMD bash/run-prod.sh diff --git a/bash/run-prod.sh b/bash/run-prod.sh new file mode 100644 index 0000000..f6eff72 --- /dev/null +++ b/bash/run-prod.sh @@ -0,0 +1,2 @@ +#!/bin/sh +yes yes | python3 manage.py migrate && python3 manage.py collectstatic --noinput && gunicorn workout.wsgi -b 0.0.0.0:8000 --log-file - \ No newline at end of file diff --git a/muscu/__init__.py b/muscu/__init__.py deleted file mode 100644 index e69de29..0000000