docker-compose.yml 728 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
networks:
Laury Bueno's avatar
Laury Bueno committed
7 8
  base:
    name: base
Laury Bueno's avatar
Laury Bueno committed
9

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

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

  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
43
    networks:
Laury Bueno's avatar
Laury Bueno committed
44
      - base