version: '3'
services:
  wallabag:
    image: wallabag/wallabag:2.6.4
    container_name: wallabagv2
    restart: unless-stopped
    environment:
      - MYSQL_ROOT_PASSWORD=wallaroot
        # - SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
      - SYMFONY__ENV__DATABASE_DRIVER=pdo_sqlite
        #- SYMFONY__ENV__DATABASE_HOST=wallabag-mariadb
        #- SYMFONY__ENV__DATABASE_PORT=3306
      - SYMFONY__ENV__DATABASE_NAME=wallabag
      - SYMFONY__ENV__DATABASE_USER=wallabag
      - SYMFONY__ENV__DATABASE_PASSWORD=wallapass
        #- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
        #- SYMFONY__ENV__DATABASE_TABLE_PREFIX="wallabag_"
      - SYMFONY__ENV__MAILER_DSN=smtp://10.0.0.27
      - SYMFONY__ENV__FROM_EMAIL=wallabag@egonetix.de
      - SYMFONY__ENV__DOMAIN_NAME=https://wallabag.egonetix.de
      - SYMFONY__ENV__SERVER_NAME="Egonetix Wallabag"
    ports:
      - "8088:80"
    volumes:
      - /home/icke/wallabagv2/images:/var/www/wallabag/web/assets/images
      - /home/icke/wallabagv2/data:/var/www/wallabag
        #      - /home/icke/wallabagv2/var:/var/www/wallabag/var
    healthcheck:
      test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost/api/info"]
      interval: 1m
      timeout: 3s
      #depends_on:
            #- wallabag-mariadb
            #- redis
        #wallabag-mariadb:
        #image: lscr.io/linuxserver/mariadb:latest
        #container_name: wallabag-db
        #restart: unless-stopped
        #environment:
        #- MYSQL_ROOT_PASSWORD=wallaroot
        #- MYSQL_ROOT_USER=root
        #- MYSQL_PASSWORD=wallapass
        #- MYSQL_DATABASE=wallabag
        #- MYSQL_USER=wallabag
        #volumes:
        #- /home/icke/wallabagv2/data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
      interval: 20s
      timeout: 3s
      #  redis:
      #image: redis:alpine
      #restart: unless-stopped    
      #healthcheck:
      #test: ["CMD", "redis-cli", "ping"]
      #interval: 20s
      #timeout: 3s
