version: "3"
services:
  trellis:
    image: trellisldp/trellis:latest
    environment:
      TRELLIS_DB_USERNAME: user
      TRELLIS_DB_PASSWORD: user
      TRELLIS_DB_URL: jdbc:postgresql://db/database
    ports:
      - 80:8080
    depends_on:
      - db
    volumes:
      - /local/trellis/data:/opt/trellis/data
      - /local/trellis/log:/opt/trellis/log
      # Please see note below about the ./etc directory
      # - /local/trellis/etc:/opt/trellis/etc
  db:
    image: postgres
    environment:
      POSTGRES_DB: database
      POSTGRES_PASSWORD: user
      POSTGRES_USER: user
      PGDATA: /var/lib/postgresql/data/pgdata/mydata
    volumes:
      - /local/postgresql/data/folder:/var/lib/postgresql/data/pgdata/mydata
