(Grav GitSync) Automatic Commit from RealStickman
This commit is contained in:
parent
5c389deecc
commit
38130abb27
@ -4,22 +4,22 @@ title: Komga
|
||||
|
||||
[toc]
|
||||
## Create directories
|
||||
`# mkdir -p /var/kavita/{config,content}`
|
||||
`# mkdir -p /var/kavita/content/{manga,books,tech}`
|
||||
`# mkdir -p /var/komga/{config,content}`
|
||||
`# mkdir -p /var/komga/content/{manga,books,tech}`
|
||||
|
||||
## Run Kavita
|
||||
## Run Komga
|
||||
```
|
||||
# podman run --name kavita -p 5000:5000 \
|
||||
-v /var/kavita/content:/content \
|
||||
-v /var/kavita/config:/kavita/config \
|
||||
# podman run --name komga -p 8080:8080 \
|
||||
-v /var/komga/config:/config \
|
||||
-v /var/komga/content:/content \
|
||||
--restart unless-stopped \
|
||||
-d docker.io/kizaing/kavita:latest
|
||||
-d docker.io/gotson/komga:latest
|
||||
```
|
||||
|
||||
## Nginx Config
|
||||
```
|
||||
server {
|
||||
server_name kavita.exu.li;
|
||||
server_name komga.exu.li;
|
||||
|
||||
# Security / XSS Mitigation Headers
|
||||
add_header X-Frame-Options "SAMEORIGIN";
|
||||
@ -29,7 +29,7 @@ server {
|
||||
|
||||
location / {
|
||||
# Proxy main traffic
|
||||
proxy_pass http://172.16.53.100:5000;
|
||||
proxy_pass http://172.16.53.100:8080;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@ -39,34 +39,20 @@ server {
|
||||
}
|
||||
|
||||
listen *:443 ssl http2; #set ipv6 address
|
||||
ssl_certificate_key /etc/acme-sh/kavita.exu.li/key.pem;
|
||||
ssl_certificate /etc/acme-sh/kavita.exu.li/cert.pem;
|
||||
ssl_certificate_key /etc/acme-sh/komga.exu.li/key.pem;
|
||||
ssl_certificate /etc/acme-sh/komga.exu.li/cert.pem;
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = kavita.exu.li) {
|
||||
if ($host = komga.exu.li) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
listen *:80; #set ipv6 address
|
||||
server_name kavita.exu.li;
|
||||
server_name komga.exu.li;
|
||||
return 404;
|
||||
}
|
||||
```
|
||||
|
||||
## Systemd Service
|
||||
*don't do this, use [Podman](/linux/services/podman) to generate a service file.*
|
||||
`/etc/systemd/system/kavita.service`
|
||||
```
|
||||
[Unit]
|
||||
Description=Kavita Podman container
|
||||
[Service]
|
||||
Restart=always
|
||||
ExecStart=/usr/bin/podman start -a kavita
|
||||
ExecStop=/usr/bin/podman stop -t 10 kavita
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
```
|
||||
|
||||
`# systemctl daemon-reload`
|
||||
`# systemctl enable --now kavita`
|
||||
> See [Podman](/linux/services/podman) to generate a service file.*
|
||||
|
Loading…
Reference in New Issue
Block a user