version: "3.8"

services:
  app:
    build: .
    env_file:
      - .env
    ports:
      - "8000:8000"

{% if cookiecutter.database == "Postgres" %}
  database:
    image: postgres:12
    env_file:
      - .env
    ports:
      - "5432:5432"
{% elif cookiecutter.database == "MySQL" %}
  database:
    image: mysql:5.7
    env_file:
      - .env
    ports:
      - "3306:3306"
{% endif %}
