change port to 8443 & add dns script

This commit is contained in:
Michi 2025-04-22 08:57:57 +02:00
parent 733fe0716b
commit 55862ba54d
3 changed files with 7 additions and 2 deletions

1
duckdns/cronjob Normal file
View file

@ -0,0 +1 @@
*/30 * * * * /app/dns/update_duckdns.sh

View file

@ -0,0 +1,4 @@
#!/bin/bash
IP=$(ip addr show wlan0 | grep 'inet ' | awk '{print $2}' | cut -d'/' -f1)
curl -s 'https://www.duckdns.org/update?domains=<DOMAIN>&token=<TOKEN>&ip='$IP

View file

@ -16,7 +16,7 @@ RUN pip3 install pipenv
RUN pip install --no-cache-dir -r requirements.txt
# Expose port
EXPOSE 8080
EXPOSE 8443
# Imort script
COPY webservice.py .
@ -27,4 +27,4 @@ COPY certs/key.pem .
COPY certs/cert.pem .
# Start app
CMD ["uvicorn", "webservice:app", "--host", "0.0.0.0", "--port", "8080", "--ssl-keyfile=key.pem", "--ssl-certfile=cert.pem"]
CMD ["uvicorn", "webservice:app", "--host", "0.0.0.0", "--port", "8443", "--ssl-keyfile=key.pem", "--ssl-certfile=cert.pem"]