diff --git a/README.md b/README.md index 43d316d..ab16309 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Join our [Discord](https://discord.gg/8fQdxay9z2)! - [Environment Setup](#environment-setup) - [Optional Configuration Changes](#optional-configuration-changes) - [DebridMediaManager setup (optional)](#debridmediamanager-setup-optional) + - [Configure external access](#configure-external-access) - [Run the project](#run-the-project) - [Monitoring with Grafana and Prometheus (Optional)](#monitoring-with-grafana-and-prometheus-optional) - [Accessing RabbitMQ Management](#accessing-rabbitmq-management) @@ -43,7 +44,7 @@ Stremio is a media player. On it's own it will not allow you to watch anything. ## Using -The project is shipped as an all-in-one solution. The initial configuration is designed for hosting only on your local network. If you want it to be accessible from outside of your local network, please see [not yet available]() +The project is shipped as an all-in-one solution. The initial configuration is designed for hosting only on your local network. If you want it to be accessible from outside of your local network, please see [Configure external access](#configure-external-access). ### Download Docker and Docker Compose v2 @@ -94,12 +95,24 @@ We can search DebridMediaManager hash lists which are hosted on GitHub. This all ``` GithubSettings__PAT= ``` +### Configure external access +What you will need: +1. Domain or subdomain that points toward your IP. You can use [DuckDNS](duckdns.org) for a free subdomain. [Installation instructions](http://www.duckdns.org/install.jsp) are provided to keep your IP updated. +2. Ports 80 and 443 opened on your router/gateway and forwarded to your Knightcrawler server. Refer to [PortForward.com](https://portforward.com/). Please note that this action may pose security vulnerabilities and potential damage for which Knightcrawler and its contributors cannot be held responsible. + +Navigate to `knightcrawler/development/docker` and edit the `Caddyfile` to replace `your-domain.com` with your domain name. ### Run the project -Open a terminal in the project directory and run the command: + If you have configured external access, utilize the following commands: +```sh +cd deployment/docker +docker-compose -f docker-compose.yaml -f docker-compose-caddy.yaml up -d +``` + + If you have not configured external access, utilize the following commands: ```sh cd deployment/docker docker compose up -d @@ -303,5 +316,4 @@ This command should return: `ALTER DATABASE`. This means your database is now re ## To-do -- [ ] Add a section on external access - [ ] Add a troubleshooting section diff --git a/deployment/docker/Caddyfile b/deployment/docker/Caddyfile new file mode 100644 index 0000000..f079a2b --- /dev/null +++ b/deployment/docker/Caddyfile @@ -0,0 +1,3 @@ +your-domain.com { + reverse_proxy 127.0.0.1:7000 +} diff --git a/deployment/docker/docker-compose-caddy.yaml b/deployment/docker/docker-compose-caddy.yaml new file mode 100644 index 0000000..2e08eb5 --- /dev/null +++ b/deployment/docker/docker-compose-caddy.yaml @@ -0,0 +1,21 @@ +version: "3.7" + +services: + caddy: + image: caddy:latest + restart: unless-stopped + cap_add: + - NET_ADMIN + ports: + - "80:80" + - "443:443" + - "443:443/udp" + volumes: + - $PWD/Caddyfile:/etc/caddy/Caddyfile + - $PWD/site:/srv + - caddy_data:/data + - caddy_config:/config + +volumes: + caddy_data: + caddy_config: diff --git a/deployment/docker/docker-compose.yaml b/deployment/docker/docker-compose.yaml index ab2687e..240f350 100644 --- a/deployment/docker/docker-compose.yaml +++ b/deployment/docker/docker-compose.yaml @@ -127,7 +127,7 @@ services: <<: *knightcrawler-app networks: - knightcrawler-network - + networks: knightcrawler-network: driver: bridge