From 455729aa48f2ff9871816045a80512f8afb3cef2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Magnus=20Alexander=20Str=C3=B8mseng?= Date: Wed, 17 Apr 2024 14:46:50 +0200 Subject: [PATCH] Add firewall rules for HTTP and HTTPS ports --- docs/deployment.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/docs/deployment.md b/docs/deployment.md index 99fa84b..9173e5c 100644 --- a/docs/deployment.md +++ b/docs/deployment.md @@ -19,6 +19,12 @@ paste the lines # Frontend (next.js node) Open TCP port 3000 for the world: -I DOCKER-USER -p tcp -m conntrack --ctorigdstport 3000 -j ACCEPT +# Open port 80 for HTTP +-I INPUT -p tcp -m tcp --dport 80 -j ACCEPT + +# Open port 443 for HTTPS +-I INPUT -p tcp -m tcp --dport 443 -j ACCEPT + # Backend (strapi) Open TCP port 1337 for world: -I DOCKER-USER -p tcp -m conntrack --ctorigdstport 1337 -j ACCEPT @@ -79,10 +85,10 @@ And the following variables: - STRAPI_URL=http://backend-app:1337 - PORT=1337 - #### Logs and errors ##### Action runner + If the action runner is having issues, try running this command to check out its logs. `sudo journalctl -u actions.runner.ITP2-SmallSatLab-Hypso-IT2901-SmallSatLab-Hypso.smallsat01.service -f` @@ -92,8 +98,9 @@ Keep in mind, the name might be something else than what is shown in the command ##### Docker -If there are any issues with docker. You can run the following commands to see logs: -- `sudo docker ps -a` to see all running conatiners. -- `sudo docker logs `, with the hash of the container (you usually only need to type in the first few letters), to see the logs printed to console. +If there are any issues with docker. You can run the following commands to see logs: + +- `sudo docker ps -a` to see all running conatiners. +- `sudo docker logs `, with the hash of the container (you usually only need to type in the first few letters), to see the logs printed to console. Log `outreach:backend` for strapi, and `outreach:frontend` for next.js.