parent
b692162e95
commit
c3fc358728
4 changed files with 38 additions and 2 deletions
@ -0,0 +1,11 @@ |
||||
FROM python:3.6 |
||||
ENV PYTHONUNBUFFERED 1 |
||||
RUN mkdir /lilcity |
||||
WORKDIR /lilcity |
||||
ADD requirements.txt /lilcity/ |
||||
RUN apt-get update \ |
||||
&& apt-get install -y postgresql-client-9.4 \ |
||||
&& rm -rf /var/lib/apt/lists/* \ |
||||
&& pip install --upgrade pip \ |
||||
&& pip install -r requirements.txt |
||||
ADD . /lilcity/ |
||||
@ -0,0 +1,20 @@ |
||||
version: '3' |
||||
services: |
||||
postgres: |
||||
image: postgres:9.6 |
||||
environment: |
||||
- POSTGRES_PASSWORD=1234 |
||||
- POSTGRES_USER=postgres |
||||
|
||||
web: |
||||
build: . |
||||
restart: always |
||||
volumes: |
||||
- .:/lilcity |
||||
command: bash -c "python manage.py migrate && python manage.py runserver 0.0.0.0:8000" |
||||
environment: |
||||
- DJANGO_SETTINGS_MODULE=project.settings |
||||
ports: |
||||
- "8000:8000" |
||||
depends_on: |
||||
- postgres |
||||
Loading…
Reference in new issue