services:
  caddy:
    image: slothcroissant/caddy-cloudflaredns:2.9.1
    container_name: caddy
    restart: always
    ports:
      - 82:80
      - 444:443
    environment:
      - ACME_AGREE=true
    volumes:
      - caddy_data:/data
      - caddy_config:/config
      - ./Caddyfile:/etc/caddy/Caddyfile

  groupoffice:
    image: intermesh/groupoffice:6.8
    container_name: groupoffice
    restart: always
    ports:
      - "127.0.0.1:9000:80"
        #links:
        #- db
    volumes:
      - "godata:/var/lib/groupoffice:cached"
      - "goetc:/etc/groupoffice:cached"
      - "gostudio:/usr/local/share/groupoffice/go/modules/studio:cached"
    env_file:
      - ./db.env

        #db:
        #image: mariadb:11.1
        # container_name: db
        # restart: always
        #env_file:
        #- ./db.env
        #environment:
        #MYSQL_ROOT_PASSWORD: $3Pt2175
        #MARIADB_AUTO_UPGRADE: 1
        #volumes:
        #- "dbdata:/var/lib/mysql:cached"

  phpmyadmin:
    image: phpmyadmin:latest
    container_name: phpmyadmin
    restart: always
    ports:
      - "49.12.192.156:3306:80"
    environment:
      - PMA_ARBITRARY=0
      - PMA_HOST=db
      - PMA_ABSOLUTE_URI=https://pma.lojiq.co
      - HIDE_PHP_VERSION=true

volumes:
  caddy_data:
  caddy_config:
  godata:
  goetc:
  gostudio:
  dbdata:
