nagimov / agendav-docker

Docker image for agendav
MIT License
30 stars 14 forks source link

Agendav and Baikal #8

Open NguyenNamUET opened 2 years ago

NguyenNamUET commented 2 years ago

Hello, I'm using Baikal as backend server for Agendav (client server) I'm using https://github.com/ckulka/baikal-docker to configure Baikal running at 8081

version: "2"
services:
  baikal:
    image: ckulka/baikal:nginx
    restart: always
    ports:
      - "8081:80"
    volumes:
      - config:/var/www/baikal/config
      - data:/var/www/baikal/Specific

volumes:
  config:
  data:

In Agendev, I have following config

version: "2"
services:
  agendav:
    image: ghcr.io/nagimov/agendav-docker:latest
    container_name: agendav
    environment:
      - AGENDAV_SERVER_NAME=localhost
      - AGENDAV_TITLE=Welcome to Example Agendav Server
      - AGENDAV_FOOTER=Hosted by Example Company
      - AGENDAV_ENC_KEY=my_encrypt10n_k3y
      - AGENDAV_CALDAV_SERVER=http://localhost:8081/dav.php # I also tried /baikal/html/dav.php or cal.php but in vain
      - AGENDAV_TIMEZONE=UTC
      - AGENDAV_LANG=en
      - AGENDAV_LOG_DIR=/tmp/
    ports:
      - "8080:80"

However, I cannot log in to Agendav using

  1. User I created when configuring Baikal
  2. Users I added at tab Users and Resources of Baikal Specifically, I encountered this error image
nagimov commented 2 years ago

@NguyenNamUET have you specified basic auth in baikal? Screenshot_2022-08-29_08-29-04

NguyenNamUET commented 2 years ago

@nagimov Thanks for your reply I just follow this issue And I did config webDAV authentication type to Basic

But I still cannot login.

Here is my new docker-compose.yml

version: "3"

services:
  baikal:
    image: ckulka/baikal:nginx
    restart: always
    ports:
      - "8080:80"
    volumes:
      - config:/var/www/baikal/config
      - data:/var/www/baikal/Specific

  db:
    image: mariadb:10
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: adalovelace
      MYSQL_DATABASE: baikal
      MYSQL_USER: baikal
      MYSQL_PASSWORD: ilovecookies
    volumes:
      - db:/var/lib/mysql

  agendav:
    image: ghcr.io/nagimov/agendav-docker:latest
    container_name: agendav
    environment:
      - AGENDAV_SERVER_NAME=127.0.0.1
      - AGENDAV_TITLE=Welcome to Example Agendav Server
      - AGENDAV_FOOTER=Hosted by Example Company
      - AGENDAV_ENC_KEY=my_encrypt10n_k3y
      - AGENDAV_CALDAV_SERVER=http://localhost:8080/dav.php/
      - AGENDAV_TIMEZONE=UTC
      - AGENDAV_LANG=en
      - AGENDAV_LOG_DIR=/tmp/
    ports:
      - "8081:80"

volumes:
  config:
  data:
  db:
taylor87654321 commented 1 year ago

I seem to be having the exact same error on my end and I'm not sure how to debug through it. I have tried connecting with digest and basic with the same results. Both Baikal and AgenDAV are on my main cpu (not using docker) and I am also using the server nginx like OP.

shroomify-it commented 1 year ago

Hi, I'd like to contribute : I'm on Linux pidev 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

I'm using docker Engine v 23.0.6 raspberrypi3 is on 10.33.33.7

my docker-compose.yml :

version: "3"

services:
  baikal:
    image: ckulka/baikal:nginx
    container_name: baikal-app
    restart: always
    ports:
      - "8081:80"
    volumes:
      - baikal-config:/var/www/baikal/config
      - baikal-specific:/var/www/baikal/Specific
    links:
      - db

  db:
    image: lscr.io/linuxserver/mariadb:latest
    restart: always
    container_name: baikal-db
    environment:
      MYSQL_ROOT_PASSWORD: adalovelace
      MYSQL_DATABASE: baikal
      MYSQL_USER: baikal
      MYSQL_PASSWORD: ilovecookies
    volumes:
      - baikal-db:/var/lib/mysql

  agendav:
    image: ghcr.io/nagimov/agendav-docker:latest
    container_name: agendav
    environment:
      - AGENDAV_SERVER_NAME=127.0.0.1
      - AGENDAV_TITLE=AgendaRRC
      - AGENDAV_FOOTER=hébergé chez Tim
      - AGENDAV_ENC_KEY=my_encrypt10n_k3y
      - AGENDAV_CALDAV_SERVER=https://10.33.33.7:8081/cal.php
      - AGENDAV_CALDAV_PUBLIC_URL=https://10.33.33.7:8081
      - AGENDAV_TIMEZONE=UTC
      - AGENDAV_LANG=en
      - AGENDAV_LOG_DIR=/tmp/
    ports:
      - "801:8080"

volumes :
  baikal-config:
  baikal-data:
  baikal-db:
  baikal-specific:

I got an error on agendav's login screen image

I did setup basic auth on baikal.

Any tips ?

edit : formating

shroomify-it commented 1 year ago

I switched to radicale and it works fine...

 docker run -d --name radicale     -p 5232:5232     -v ~/radicale/data:/data     tomsquest/docker-radicale

with the updated docker-compose :

version: "3"

services:
  radicale:
    image: tomsquest/docker-radicale
    container_name: agendav-radicale-radicale
    ports:
      - "5232:5232"
    volumes:
      - /srv/agendav-radicale/datatree:/data
      - /srv/agendav-radicale/config:/config
      - /srv/agendav-radicale/etc/radicale:/etc/radicale
    restart: unless-stopped
    networks:
      - proxy

  agendav:
    image: ghcr.io/nagimov/agendav-docker:latest
    container_name: agendav-radicale-agendav
    environment:
      - AGENDAV_SERVER_NAME=agendav.example.com
      - AGENDAV_TITLE=AgendaRadicale
      - AGENDAV_FOOTER=AGENDA 
      - AGENDAV_ENC_KEY=lyufs42wkgdsuwy345894C4h23d_dh
      - AGENDAV_CALDAV_SERVER=http://10.0.0.1:5232/%u
      - AGENDAV_CALDAV_PUBLIC_URL=https://agendav.example.com
      - AGENDAV_AUTH_METHOD=digest
      - AGENDAV_TIMEZONE=Europe/Paris
      - AGENDAV_LANG=fr
      - AGENDAV_LOG_DIR=/tmp/
    ports:
      - "800:8080"
    restart: unless-stopped
    networks:
      - proxy

networks:
  proxy:
    external: true

the default credentials are radicale/radicale