version: '2.4'
services:
  django:
    image: crocmagnon/checkout:dev
    build:
      context: .
      args:
        POETRY_OPTIONS: "--no-dev"
    env_file:
      - envs/docker-local.env
    volumes:
      - ./db:/app/db
      - staticfiles:/app/staticfiles
      - media:/app/media
    restart: on-failure
    init: true
    tty: true
    ports:
      - "8000:8000"

  grafana:
    image: grafana/grafana-oss
    volumes:
      - grafana:/var/lib/grafana
      - ./db:/app/db
    environment:
      - GF_INSTALL_PLUGINS=frser-sqlite-datasource
    ports:
      - "3000:3000"

volumes:
  staticfiles: {}
  media: {}
  grafana: {}
