feat: lazylibrarian
This commit is contained in:
parent
2a7d337d36
commit
884dd43419
6
lazylibrarian/.env
Normal file
6
lazylibrarian/.env
Normal file
@ -0,0 +1,6 @@
|
||||
BASE_URL=lazylibrarian.
|
||||
EMAIL=
|
||||
MEDIA_PATH=
|
||||
|
||||
PUID=1000
|
||||
PGID=1000
|
17
lazylibrarian/Dockerfile
Normal file
17
lazylibrarian/Dockerfile
Normal file
@ -0,0 +1,17 @@
|
||||
FROM docker.io/python:3.12-slim as base
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
WORKDIR /app/
|
||||
|
||||
FROM base as build
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
ARG LL='https://gitlab.com/LazyLibrarian/LazyLibrarian.git'
|
||||
RUN git clone --depth 1 "$LL" .
|
||||
|
||||
FROM base
|
||||
COPY --from=build /app/ .
|
||||
EXPOSE 5299
|
||||
RUN pip install --no-cache-dir .
|
||||
CMD ["python", "LazyLibrarian.py", "--datadir", "/config", "--nolaunch"]
|
36
lazylibrarian/compose.yaml
Normal file
36
lazylibrarian/compose.yaml
Normal file
@ -0,0 +1,36 @@
|
||||
---
|
||||
services:
|
||||
install_site:
|
||||
build: install_site
|
||||
environment:
|
||||
- BASE_URL
|
||||
- EMAIL
|
||||
volumes:
|
||||
- ./nginx.conf:/web/lazylibrarian.conf
|
||||
- sites:/sites/
|
||||
- certs:/etc/letsencrypt/
|
||||
- certbotroot:/var/www/certbot/
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
lazilibrarian:
|
||||
build: .
|
||||
user: "$PUID:PGID"
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- config:/config/
|
||||
- $MEDIA_PATH:/data/
|
||||
networks:
|
||||
- nginx
|
||||
|
||||
volumes:
|
||||
sites:
|
||||
external: true
|
||||
certs:
|
||||
external: true
|
||||
certbotroot:
|
||||
external: true
|
||||
config:
|
||||
|
||||
networks:
|
||||
nginx:
|
||||
external: true
|
4
lazylibrarian/config.ini
Normal file
4
lazylibrarian/config.ini
Normal file
@ -0,0 +1,4 @@
|
||||
[General]
|
||||
logdir = /config/log
|
||||
destination_dir = /data/media/books
|
||||
download_dir = /data/torrents
|
1
lazylibrarian/install_site
Symbolic link
1
lazylibrarian/install_site
Symbolic link
@ -0,0 +1 @@
|
||||
../_nginx/install_site
|
29
lazylibrarian/nginx.conf
Normal file
29
lazylibrarian/nginx.conf
Normal file
@ -0,0 +1,29 @@
|
||||
server {
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name $BASE_URL;
|
||||
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
listen [::]:443 ssl;
|
||||
server_name $BASE_URL;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/$BASE_URL/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/$BASE_URL/privkey.pem;
|
||||
|
||||
location / {
|
||||
proxy_pass http://lazylibrarian:5299;
|
||||
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Host $host;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $http_connection;
|
||||
proxy_redirect off;
|
||||
proxy_http_version 1.1;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user