Python 3.13 + add nginx reverse-proxy
All checks were successful
lint / docker (push) Successful in 14m2s
All checks were successful
lint / docker (push) Successful in 14m2s
This commit is contained in:
parent
8ef9bbde06
commit
da50051a3f
@ -14,7 +14,7 @@ jobs:
|
|||||||
- name: Install Python
|
- name: Install Python
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: '3.12'
|
python-version: '3.13'
|
||||||
cache: 'pip' # caching pip dependencies
|
cache: 'pip' # caching pip dependencies
|
||||||
- run: pip install ruff
|
- run: pip install ruff
|
||||||
- run: |
|
- run: |
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
FROM python:3.12-slim
|
FROM python:3.13-slim
|
||||||
|
|
||||||
WORKDIR /opt/tisbackup
|
WORKDIR /opt/tisbackup
|
||||||
|
|
||||||
@ -8,7 +8,7 @@ COPY . /opt/tisbackup
|
|||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install --no-install-recommends -y rsync ssh cron \
|
&& apt-get install --no-install-recommends -y rsync ssh cron \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& /usr/local/bin/python3.12 -m pip install --no-cache-dir -r requirements.txt \
|
&& /usr/local/bin/python3.13 -m pip install --no-cache-dir -r requirements.txt \
|
||||||
&& mkdir -p /var/spool/cron/crontabs \
|
&& mkdir -p /var/spool/cron/crontabs \
|
||||||
&& echo '59 03 * * * root /bin/bash /opt/tisbackup/backup.sh' > /etc/crontab \
|
&& echo '59 03 * * * root /bin/bash /opt/tisbackup/backup.sh' > /etc/crontab \
|
||||||
&& echo '' >> /etc/crontab \
|
&& echo '' >> /etc/crontab \
|
||||||
@ -17,4 +17,4 @@ RUN apt-get update \
|
|||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
CMD ["/usr/local/bin/python3.12","/opt/tisbackup/tisbackup_gui.py"]
|
CMD ["/usr/local/bin/python3.13","/opt/tisbackup/tisbackup_gui.py"]
|
||||||
|
29
README.md
29
README.md
@ -108,6 +108,35 @@ Run!
|
|||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## NGINX reverse-proxy
|
||||||
|
|
||||||
|
Sample config file
|
||||||
|
|
||||||
|
```nginx
|
||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
# Remove '#' in the next line to enable IPv6
|
||||||
|
# listen [::]:443 ssl http2;
|
||||||
|
server_name tisbackup.poudlard.lan;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/tisbackup.poudlard.lan/fullchain.pem; # managed by Certbot
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/tisbackup.poudlard.lan/privkey.pem; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass http://localhost:9980/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## About
|
## About
|
||||||
|
|
||||||
[Tranquil IT](contact_at_tranquil_it) is the original author of TISBackup.
|
[Tranquil IT](contact_at_tranquil_it) is the original author of TISBackup.
|
||||||
|
20
nginx/tisbackup.conf
Normal file
20
nginx/tisbackup.conf
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
server {
|
||||||
|
listen 443 ssl http2;
|
||||||
|
# Remove '#' in the next line to enable IPv6
|
||||||
|
# listen [::]:443 ssl http2;
|
||||||
|
server_name tisbackup.poudlard.lan;
|
||||||
|
|
||||||
|
ssl_certificate /etc/letsencrypt/live/tisbackup.poudlard.lan/fullchain.pem; # managed by Certbot
|
||||||
|
ssl_certificate_key /etc/letsencrypt/live/tisbackup.poudlard.lan/privkey.pem; # managed by Certbot
|
||||||
|
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_pass http://localhost:9980/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user