docker-compose.bookstack.yml.j2 1.17 KB
Newer Older
Nick Busey's avatar
Nick Busey committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
---
version: '3'

networks:
  traefik_network:
    external:
      name: homelabos_traefik

services:
  mysql:
    image: mysql:5.7.21
    networks:
      - traefik_network
    restart: unless-stopped
    environment:
    - MYSQL_ROOT_PASSWORD=secret
    - MYSQL_DATABASE=bookstack
    - MYSQL_USER=bookstack
    - MYSQL_PASSWORD=secret
    volumes:
    - /var/homelabos/bookstack/mysql-data:/var/lib/mysql

  bookstack:
    image: solidnerd/bookstack:0.24.3
    networks:
      - traefik_network
    restart: unless-stopped
    depends_on:
    - mysql
    environment:
    - DB_HOST=mysql:3306
    - DB_DATABASE=bookstack
    - DB_USERNAME=bookstack
    - DB_PASSWORD=secret
    volumes:
    - /var/homelabos/bookstack/uploads:/var/www/bookstack/public/uploads
    - /var/homelabos/bookstack/storage-uploads:/var/www/bookstack/public/storage
    labels:
      - "traefik.enable=true"
      - "traefik.docker.network=homelabos_traefik"
      - "traefik.http.frontend.rule=Host:bookstack.{{ domain }}"
      - "traefik.http.protocol=http"
      - "traefik.http.port=80"
      - "traefik.tor.frontend.rule=Host:bookstack.{{ tor_domain }}"
      - "traefik.tor.protocol=http"
      - "traefik.tor.port=80"