Skip to content

Instantly share code, notes, and snippets.

@zigomir
Last active December 26, 2020 15:23
Show Gist options
  • Save zigomir/ac5e409e27a315ef38e82c957d3b409d to your computer and use it in GitHub Desktop.
Save zigomir/ac5e409e27a315ef38e82c957d3b409d to your computer and use it in GitHub Desktop.
Django local dev on docker-compose
version: "3.8"
services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- .:/app
ports:
- "8000:8000"
depends_on:
- db
db:
image: postgres
environment:
- POSTGRES_DB=db_name
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
FROM python:3
ENV PYTHONUNBUFFERED 1
RUN mkdir /app
WORKDIR /app
COPY requirements.txt /app/
RUN pip install -r requirements.txt
@zigomir
Copy link
Author

zigomir commented Dec 26, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment