Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 658 Bytes

README.md

File metadata and controls

43 lines (28 loc) · 658 Bytes

Example docker-compose.yml:

version: '3'

services:
  web:
    image: mugen0815/djangorest
    ports:
      - "8000:8000"
    volumes:
      - db:/data # Mount the volume to persist the data
    command: python manage.py runserver 0.0.0.0:8000

volumes:
  db:

Example docker-compose.yml for developing:

version: '3'

services:
  web:
    build: .
    ports:
      - "8000:8000"
    volumes:
      - ./db:/data # Mount the volume to persist the data
      - ./app:/app # Mount the app directory to the container
    command: python manage.py runserver 0.0.0.0:8000