docker-compose.yml 826 Bytes
Newer Older
Laury Bueno's avatar
Laury Bueno committed
1
version: '3.5'
2 3 4 5

volumes:
  db_data: {}

Laury Bueno's avatar
Laury Bueno committed
6 7 8 9
networks:
  base_django_project:
    name: base_django_project

10
services:
Laury Bueno's avatar
Laury Bueno committed
11 12 13 14 15 16
  redis:
    image: redis:3.2
    hostname: redis
    networks:
      - base_django_project

17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
  django:
    build:
      context: .
      dockerfile: ./compose/local/django/Dockerfile
    depends_on:
      - postgres
    volumes:
      - .:/app
    environment:
      - POSTGRES_DB=django
      - POSTGRES_USER=django
      - POSTGRES_PASSWORD=django
      - USE_DOCKER=yes
    ports:
      - "8000:8000"
    command: /runserver.sh
Laury Bueno's avatar
Laury Bueno committed
33 34
    networks:
      - base_django_project
35 36 37 38 39 40 41 42 43

  postgres:
    image: postgres:9.6
    volumes:
      - db_data:/var/lib/postgresql/data
    environment:
      - POSTGRES_DB=django
      - POSTGRES_USER=django
      - POSTGRES_PASSWORD=django
Laury Bueno's avatar
Laury Bueno committed
44 45
    networks:
      - base_django_project