diff --git a/duckdns/cronjob b/duckdns/cronjob new file mode 100644 index 0000000..40fa268 --- /dev/null +++ b/duckdns/cronjob @@ -0,0 +1 @@ +*/30 * * * * /app/dns/update_duckdns.sh \ No newline at end of file diff --git a/duckdns/update_duckdns.sh b/duckdns/update_duckdns.sh new file mode 100644 index 0000000..0296643 --- /dev/null +++ b/duckdns/update_duckdns.sh @@ -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=&token=&ip='$IP \ No newline at end of file diff --git a/webservice/Dockerfile.txt b/webservice/Dockerfile.txt index aff37c9..ae089ce 100644 --- a/webservice/Dockerfile.txt +++ b/webservice/Dockerfile.txt @@ -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"] \ No newline at end of file +CMD ["uvicorn", "webservice:app", "--host", "0.0.0.0", "--port", "8443", "--ssl-keyfile=key.pem", "--ssl-certfile=cert.pem"] \ No newline at end of file