From 5e7d9328ae61a5d0ba88766e1762bc1e471f9c81 Mon Sep 17 00:00:00 2001 From: Kevin Heyer Date: Fri, 28 Mar 2025 19:38:29 +0000 Subject: [PATCH] Add Baikal container --- baikal/.env-example | 2 ++ baikal/README.md | 37 +++++++++++++++++++++++++++++++++++++ baikal/docker-compose.yml | 25 +++++++++++++++++++++++++ 3 files changed, 64 insertions(+) create mode 100644 baikal/.env-example create mode 100644 baikal/README.md create mode 100644 baikal/docker-compose.yml diff --git a/baikal/.env-example b/baikal/.env-example new file mode 100644 index 0000000..f9eda92 --- /dev/null +++ b/baikal/.env-example @@ -0,0 +1,2 @@ +BAIKAL_VERSION=0.10.1-nginx +BAIKAL_DOMAIN=baikal.example.com \ No newline at end of file diff --git a/baikal/README.md b/baikal/README.md new file mode 100644 index 0000000..ef20e59 --- /dev/null +++ b/baikal/README.md @@ -0,0 +1,37 @@ +# Baikal Docker Setup with Traefik + +This guide provides instructions for deploying Baikal using Docker and Traefik as a reverse proxy. The setup includes securing the Baikal instance with HTTPS and configuring a trusted proxy. + +## Prerequisites +- Docker and Docker Compose installed on your system +- Traefik configured as your reverse proxy +- A domain name pointing to your Baikal instance + +## Environment Variables +Before deploying the container, create a `.env` file from the provided `.env-example` file and adjust the values as needed. + +```sh +cp .env-example .env +nano .env +``` + +## Starting the Container +Once the `.env` file is configured, start the Baikal container using: +```sh +docker-compose up -d +``` + +## Configuring the Reverse Proxy +To enable proper proxy support in Baikal, update `data/config/configuration.yaml` with the following settings: + + +## Accessing Baikal +Once everything is set up, restart Baikal and it should be accessible via the configured domain: +``` +https://baikal.example.com +``` + +If there are any issues, check the container logs with: +```sh +docker logs -f baikal +``` \ No newline at end of file diff --git a/baikal/docker-compose.yml b/baikal/docker-compose.yml new file mode 100644 index 0000000..786e2c8 --- /dev/null +++ b/baikal/docker-compose.yml @@ -0,0 +1,25 @@ + baikal: + image: ckulka/baikal:${BAIKAL_VERSION:-0.10.1-nginx} + container_name: baikal + restart: always + networks: + - traefik + volumes: + - ./data/config:/var/www/baikal/config + - ./data/baikal-data:/var/www/baikal/Specific + labels: + - "traefik.enable=true" + - "traefik.docker.network=traefik" + - "traefik.http.routers.baikal.entrypoints=http" + - "traefik.http.routers.baikal.rule=Host(`${BAIKAL_DOMAIN:?error}`)" + - "traefik.http.middlewares.baikal-https-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.baikal.middlewares=caldav-https-redirect" + - "traefik.http.routers.baikal-secure.entrypoints=https" + - "traefik.http.routers.baikal-secure.rule=Host(`${BAIKAL_DOMAIN:?error}`)" + - "traefik.http.routers.baikal-secure.tls=true" + - "traefik.http.routers.baikal-secure.service=baikal" + - "traefik.http.services.baikal.loadbalancer.server.port=80" + +networks: + traefik: + external: true \ No newline at end of file -- 2.45.3