Compare commits
No commits in common. "8ff70bfaad50aab6d2e77c833c08fc3f08e7b299" and "39f64cc408fe1c795b57936a972655ef83585f9d" have entirely different histories.
8ff70bfaad
...
39f64cc408
9 changed files with 2 additions and 115 deletions
|
@ -46,8 +46,3 @@
|
|||
tags:
|
||||
- lldap
|
||||
- docker-container
|
||||
|
||||
- role: deploy_container_booklore
|
||||
tags:
|
||||
- booklore
|
||||
- docker-container
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
container_booklore_version: latest
|
||||
container_booklore_domain: booklore.example.com
|
||||
container_booklore_directory: /opt/docker/booklore
|
||||
container_booklore_db_root_password: super_duper_secret_root_password
|
||||
container_booklore_db_user: db_user
|
||||
container_booklore_db_password: super_secret_password
|
|
@ -1,28 +0,0 @@
|
|||
---
|
||||
- name: Ensure data directories exist
|
||||
ansible.builtin.file:
|
||||
path: "{{ container_booklore_directory }}/data/{{ item }}"
|
||||
state: directory
|
||||
mode: '0755'
|
||||
loop:
|
||||
- "app"
|
||||
- "books"
|
||||
- "db"
|
||||
become: false
|
||||
|
||||
- name: Deploy Docker Compose and .env files
|
||||
ansible.builtin.template:
|
||||
src: "{{ item.src }}"
|
||||
dest: "{{ container_booklore_directory }}/{{ item.dest }}"
|
||||
mode: '0644'
|
||||
loop:
|
||||
- { src: 'docker-compose.yml.j2', dest: 'docker-compose.yml' }
|
||||
- { src: '.env.j2', dest: '.env' }
|
||||
become: false
|
||||
|
||||
- name: Start Container
|
||||
community.docker.docker_compose_v2:
|
||||
project_src: "{{ container_booklore_directory }}"
|
||||
pull: always
|
||||
docker_host: "unix:///run/user/1000/docker.sock"
|
||||
become: false
|
|
@ -1,10 +0,0 @@
|
|||
# Booklore Version (Standard: latest) # Excalidraw Version (Standard: latest)
|
||||
BOOKLORE_VERSION={{ container_booklore_version }}
|
||||
|
||||
# Booklore Domain
|
||||
BOOKLORE_DOMAIN={{ container_booklore_domain }}
|
||||
|
||||
# Booklore DB
|
||||
BOOKLORE_DB_ROOT_PASSWORD={{ container_booklore_db_root_password }}
|
||||
BOOKLORE_DB_USER={{ container_booklore_db_user }}
|
||||
BOOKLORE_DB_PASSWORD={{ container_booklore_db_password }}
|
|
@ -1,63 +0,0 @@
|
|||
---
|
||||
services:
|
||||
booklore:
|
||||
image: ghcr.io/adityachandelgit/booklore-app:${BOOKLORE_VERSION:-latest}
|
||||
container_name: booklore
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
mariadb:
|
||||
condition: service_healthy
|
||||
networks:
|
||||
- traefik
|
||||
- booklore
|
||||
volumes:
|
||||
- ./data/app:/app/data
|
||||
- ./data/books:/books
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Europe/Berlin
|
||||
- DATABASE_URL=jdbc:mariadb://mariadb:3306/booklore
|
||||
- DATABASE_USERNAME=${BOOKLORE_DB_USER:-booklore}
|
||||
- DATABASE_PASSWORD=${BOOKLORE_DB_PASSWORD}
|
||||
- SWAGGER_ENABLED=false
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.docker.network=traefik"
|
||||
- "traefik.http.routers.booklore.entrypoints=http"
|
||||
- "traefik.http.routers.booklore.rule=Host(`${BOOKLORE_DOMAIN:?error}`)"
|
||||
- "traefik.http.middlewares.booklore-https-redirect.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.booklore.middlewares=booklore-https-redirect"
|
||||
- "traefik.http.routers.booklore-secure.entrypoints=https"
|
||||
- "traefik.http.routers.booklore-secure.rule=Host(`${BOOKLORE_DOMAIN:?error}`)"
|
||||
- "traefik.http.routers.booklore-secure.tls=true"
|
||||
- "traefik.http.routers.booklore-secure.service=booklore"
|
||||
- "traefik.http.services.booklore.loadbalancer.server.port=6060"
|
||||
|
||||
mariadb:
|
||||
image: lscr.io/linuxserver/mariadb:11.4.5
|
||||
container_name: mariadb
|
||||
networks:
|
||||
- booklore
|
||||
environment:
|
||||
- PUID=1000
|
||||
- PGID=1000
|
||||
- TZ=Etc/UTC
|
||||
- MYSQL_ROOT_PASSWORD=${BOOKLORE_DB_ROOT_PASSWORD}
|
||||
- MYSQL_DATABASE=booklore
|
||||
- MYSQL_USER=${BOOKLORE_DB_USER:-booklore}
|
||||
- MYSQL_PASSWORD=${BOOKLORE_DB_PASSWORD}
|
||||
volumes:
|
||||
- ./data/db:/config
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "mariadb-admin", "ping", "-h", "localhost"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
networks:
|
||||
traefik:
|
||||
external: true
|
||||
booklore:
|
||||
driver: bridge
|
|
@ -15,4 +15,3 @@ PermitEmptyPasswords no
|
|||
PrintMotd no
|
||||
UseDNS no
|
||||
Compression no
|
||||
Subsystem sftp /usr/lib/openssh/sftp-server
|
Loading…
Add table
Reference in a new issue