version: "3.8"

services:

  commento:
    image: registry.gitlab.com/commento/commento
    ports:
      - "8080:8080"
    environment:
      - COMMENTO_ORIGIN=http://commento.easypi.tv:8080
      - COMMENTO_PORT=8080
      - COMMENTO_POSTGRES=postgres://commento:commento@postgres:5432/commento?sslmode=disable
    depends_on:
      - postgres
    restart: unless-stopped

  postgres:
    image: postgres:alpine
    ports:
      - "5432:5432"
    volumes:
      - ./data:/var/lib/postgresql/data
    environment:
      - POSTGRES_USER=commento
      - POSTGRES_PASSWORD=commento
      - POSTGRES_DB=commento
    restart: unless-stopped
