services:
  web:
    build:
      context: ../../
      target: dev
    environment:
      - DEBUG=true
      - SECRET_KEY=super-secret-key
      - DATABASE_URL=postgres://website:website@db/website
    volumes:
      - ../../:/app
    tmpfs:
      - /tmp
    depends_on:
      - db
    ports:
      - 127.0.0.1:8000:8000
      - 127.0.0.1:8080:8080

  db:
    image: postgres:14-alpine
    environment:
      - POSTGRES_PASSWORD=website
      - POSTGRES_USER=website
    volumes:
      - ./volumes/db:/var/lib/postgresql/data