docker-compose.yml 724 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
  ctb:
    name: ctb
Laury Bueno's avatar
Laury Bueno committed
9

10
services:
Laury Bueno's avatar
Laury Bueno committed
11
  redis:
12
    image: redis:5.0
Laury Bueno's avatar
Laury Bueno committed
13 14
    hostname: redis
    networks:
Laury Bueno's avatar
Laury Bueno committed
15
      - ctb
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
      - ctb
34 35

  postgres:
36
    image: postgres:11.1
37 38 39 40 41 42
    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
      - ctb