1.5 KiB
FritzBox Self-Hosting
This setup runs the parser behind Caddy. Caddy receives public HTTP/HTTPS traffic, obtains TLS certificates, and proxies requests to the app container.
Requirements
-
A machine on your home network with Docker and Docker Compose.
-
A DNS name that points to your home connection.
-
FritzBox port sharing from the internet to the Docker host:
- TCP 80 -> Docker host TCP 80
- TCP 443 -> Docker host TCP 443
- UDP 443 -> Docker host UDP 443
If your internet provider uses CGNAT and you do not have a reachable public IP, plain FritzBox port forwarding will not work. Use IPv6 with an AAAA record, a provider option for public IPv4, or a tunnel/VPN.
Configure
Create a local environment file:
.. code-block:: shell
cp .env.local.example .env.local
Edit .env.local:
.. code-block:: dotenv
PUBLIC_HOST=menus.example.org
BASE_URL=https://menus.example.org
PUBLIC_HOST is the domain Caddy serves. BASE_URL is used by the Flask
app when it generates absolute OpenMensa feed URLs.
Run
Start or update the local deployment:
.. code-block:: shell
docker compose --env-file .env.local -f compose.local.yml up -d --build
Check logs:
.. code-block:: shell
docker compose --env-file .env.local -f compose.local.yml logs -f
Check health locally:
.. code-block:: shell
curl http://127.0.0.1/health_check
Stop
.. code-block:: shell
docker compose --env-file .env.local -f compose.local.yml down