Add Docker config
This commit is contained in:
parent
ff144cd302
commit
10fb1167b4
3 changed files with 17 additions and 0 deletions
15
Dockerfile
Normal file
15
Dockerfile
Normal file
|
@ -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
|
2
bash/run-prod.sh
Normal file
2
bash/run-prod.sh
Normal file
|
@ -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 -
|
Loading…
Reference in a new issue