From 87e54d5131909b19711222e81a1e931f932026c8 Mon Sep 17 00:00:00 2001 From: "[Mufeth7]" Date: Wed, 2 Apr 2025 18:13:07 +0530 Subject: [PATCH 01/11] docker-compose file updated and added SSL certificate using Traefik --- docs/SSL-certificate-using-Traefik .md | 15 +++++ docs/examples/docker-compose-ssl.yml | 85 ++++++++++++++++++++++++ docs/examples/docker-compose.example.yml | 2 +- 3 files changed, 101 insertions(+), 1 deletion(-) create mode 100644 docs/SSL-certificate-using-Traefik .md create mode 100644 docs/examples/docker-compose-ssl.yml diff --git a/docs/SSL-certificate-using-Traefik .md b/docs/SSL-certificate-using-Traefik .md new file mode 100644 index 00000000..72797d3d --- /dev/null +++ b/docs/SSL-certificate-using-Traefik .md @@ -0,0 +1,15 @@ +# Create Directory in OPT + ```sh + cd /opt && mkdir traefik + ``` +# create acme.json file + ```sh + touch acme.json + chmod 600 /opt/traefik/acme.json + ``` + +# after that go to docker-compose-ssl file copy and add domain name and Email address + + [docker-compose file click here](docs/examples/docker-compose-ssl.yml) + +after creating this Just run the docker-compose file that will automatically create SSL Certificate for that \ No newline at end of file diff --git a/docs/examples/docker-compose-ssl.yml b/docs/examples/docker-compose-ssl.yml new file mode 100644 index 00000000..2cee2810 --- /dev/null +++ b/docs/examples/docker-compose-ssl.yml @@ -0,0 +1,85 @@ +services: + traefik: + image: traefik:v2.10 + container_name: traefik + restart: always + ports: + - "80:80" + - "443:443" + # - "8080:8080" you want dashboard then uncomment this + command: + - "--api.insecure=true" +# - "--api.dashboard=true" you want dashboard then uncomment this + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + - "--entrypoints.web.address=:80" + - "--entrypoints.web.http.redirections.entrypoint.to=websecure" + - "--entrypoints.web.http.redirections.entrypoint.scheme=https" + - "--entrypoints.websecure.address=:443" + - "--certificatesresolvers.myresolver.acme.httpchallenge=true" + - "--certificatesresolvers.myresolver.acme.httpchallenge.entrypoint=web" + - "--certificatesresolvers.myresolver.acme.email= add your email " #add your email + - "--certificatesresolvers.myresolver.acme.storage=/acme.json" + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + - /opt/traefik/acme.json:/acme.json + networks: + - web + + cobalt-api: + image: ghcr.io/imputnet/cobalt:10 + container_name: cobalt-api + init: true + read_only: true + restart: unless-stopped + depends_on: + - traefik + expose: + - 9000 + environment: + # replace https://api.url.example/ with your instance's url + # or else tunneling functionality won't work properly + API_URL: "https://api.url.example/" + # if you want to use cookies for fetching data from services, + # uncomment the next line & volumes section + # COOKIE_PATH: "/cookies.json" + + # it's recommended to configure bot protection or api keys if the instance is public, + # see /docs/protect-an-instance.md for more info + + # see /docs/run-an-instance.md for more variables that you can use here + labels: + - "com.centurylinklabs.watchtower.scope=cobalt" + - "traefik.enable=true" + - "traefik.http.routers.cobalt.rule=Host(`Remove and add your domain name`)" #add your domain name + - "traefik.http.routers.cobalt.entrypoints=websecure" + - "traefik.http.routers.cobalt.tls=true" + - "traefik.http.routers.cobalt.tls.certresolver=myresolver" + - "traefik.http.services.cobalt.loadbalancer.server.port=9000" + # uncomment only if you use the COOKIE_PATH variable + # volumes: + # - ./cookies.json:/cookies.json + networks: + - web + + watchtower: + image: ghcr.io/containrrr/watchtower + container_name: watchtower + restart: unless-stopped + command: --cleanup --scope cobalt --interval 900 --include-restarting + volumes: + - /var/run/docker.sock:/var/run/docker.sock + networks: + - web + + # if needed, use this image for automatically generating poToken & visitor_data + # yt-session-generator: + # image: ghcr.io/imputnet/yt-session-generator:webserver + # init: true + # restart: unless-stopped + # container_name: yt-session-generator + # ports: + # - 127.0.0.1:1280:8080 +networks: + web: + driver: bridge diff --git a/docs/examples/docker-compose.example.yml b/docs/examples/docker-compose.example.yml index b2ad73c1..87516c44 100644 --- a/docs/examples/docker-compose.example.yml +++ b/docs/examples/docker-compose.example.yml @@ -50,4 +50,4 @@ services: # restart: unless-stopped # container_name: yt-session-generator # labels: - # - com.centurylinklabs.watchtower.scope=cobalt + # - com.centurylinklabs.watchtower.scope=cobalt \ No newline at end of file From 2700c4584ef5c2ace259ef808a9778d3d2a9b342 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:17:34 +0530 Subject: [PATCH 02/11] Rename SSL-certificate-using-Traefik .md to SSL-certificate-using-Traefik .md --- ...ate-using-Traefik .md => SSL-certificate-using-Traefik .md} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename docs/{SSL-certificate-using-Traefik .md => SSL-certificate-using-Traefik .md} (89%) diff --git a/docs/SSL-certificate-using-Traefik .md b/docs/SSL-certificate-using-Traefik .md similarity index 89% rename from docs/SSL-certificate-using-Traefik .md rename to docs/SSL-certificate-using-Traefik .md index 72797d3d..875421b9 100644 --- a/docs/SSL-certificate-using-Traefik .md +++ b/docs/SSL-certificate-using-Traefik .md @@ -12,4 +12,4 @@ [docker-compose file click here](docs/examples/docker-compose-ssl.yml) -after creating this Just run the docker-compose file that will automatically create SSL Certificate for that \ No newline at end of file +after creating this Just run the docker-compose file that will automatically create SSL Certificate for that From e11c5afd46fd94beea24b7161fbe7ab4a4f55c56 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:18:11 +0530 Subject: [PATCH 03/11] Update SSL-certificate-using-Traefik .md --- docs/SSL-certificate-using-Traefik .md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/SSL-certificate-using-Traefik .md b/docs/SSL-certificate-using-Traefik .md index 875421b9..01c8b48e 100644 --- a/docs/SSL-certificate-using-Traefik .md +++ b/docs/SSL-certificate-using-Traefik .md @@ -1,12 +1,11 @@ # Create Directory in OPT - ```sh + cd /opt && mkdir traefik - ``` + # create acme.json file - ```sh + touch acme.json chmod 600 /opt/traefik/acme.json - ``` # after that go to docker-compose-ssl file copy and add domain name and Email address From 4953d9de24cdd5974ba52337e004b2ae55179260 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:19:44 +0530 Subject: [PATCH 04/11] Update SSL-certificate-using-Traefik .md --- docs/SSL-certificate-using-Traefik .md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/SSL-certificate-using-Traefik .md b/docs/SSL-certificate-using-Traefik .md index 01c8b48e..e0d1f688 100644 --- a/docs/SSL-certificate-using-Traefik .md +++ b/docs/SSL-certificate-using-Traefik .md @@ -2,7 +2,7 @@ cd /opt && mkdir traefik -# create acme.json file +# Create acme.json file touch acme.json chmod 600 /opt/traefik/acme.json From 6fd4ffb847a3817b3c5be86cfe51c5dbce659545 Mon Sep 17 00:00:00 2001 From: "[Mufeth7]" Date: Wed, 2 Apr 2025 18:22:28 +0530 Subject: [PATCH 05/11] updated docker-compose file updated and added SSL certificate using Traefik --- docs/SSL-certificate-using-Traefik .md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/SSL-certificate-using-Traefik .md b/docs/SSL-certificate-using-Traefik .md index e0d1f688..f90b9900 100644 --- a/docs/SSL-certificate-using-Traefik .md +++ b/docs/SSL-certificate-using-Traefik .md @@ -9,6 +9,10 @@ # after that go to docker-compose-ssl file copy and add domain name and Email address - [docker-compose file click here](docs/examples/docker-compose-ssl.yml) + [docker-compose file click here](examples/docker-compose-ssl.yml) + + or go to docs/example/docker-compose-ssl.yml -after creating this Just run the docker-compose file that will automatically create SSL Certificate for that + copy the code and paste it and chagne the domain name and email address + +after creating this Just run the docker-compose file that will automatically create SSL Certificate for that Cobalt instance From 45312d65368a3e15323b1b30f09ca493cb4d09e1 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:23:47 +0530 Subject: [PATCH 06/11] Update SSL-certificate-using-Traefik .md --- docs/SSL-certificate-using-Traefik .md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/SSL-certificate-using-Traefik .md b/docs/SSL-certificate-using-Traefik .md index f90b9900..3960e2ab 100644 --- a/docs/SSL-certificate-using-Traefik .md +++ b/docs/SSL-certificate-using-Traefik .md @@ -10,9 +10,8 @@ # after that go to docker-compose-ssl file copy and add domain name and Email address [docker-compose file click here](examples/docker-compose-ssl.yml) - - or go to docs/example/docker-compose-ssl.yml copy the code and paste it and chagne the domain name and email address + after creating this Just run the docker-compose file that will automatically create SSL Certificate for that Cobalt instance From bb20f05220b552bbc3d3fc31d02a9a8e87b96537 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:28:04 +0530 Subject: [PATCH 07/11] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 795eb7e3..f96eef43 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,7 @@ this monorepo includes source code for api, frontend, and related packages: it also includes documentation in the [docs tree](/docs/): - [how to run a cobalt instance](/docs/run-an-instance.md) +- [installing SSL certificate for Instance](docs/examples/docker-compose-ssl.yml) - [how to protect a cobalt instance](/docs/protect-an-instance.md) - [cobalt api instance environment variables](/docs/api-env-variables.md) - [cobalt api documentation](/docs/api.md) From 218cc77f1170bcda0093e2b4603e0a37c0c4cf01 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:29:00 +0530 Subject: [PATCH 08/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f96eef43..2fed0fc6 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ this monorepo includes source code for api, frontend, and related packages: it also includes documentation in the [docs tree](/docs/): - [how to run a cobalt instance](/docs/run-an-instance.md) -- [installing SSL certificate for Instance](docs/examples/docker-compose-ssl.yml) +- [installing SSL certificate for Instance](docs/SSL-certificate-using-Traefik .md) - [how to protect a cobalt instance](/docs/protect-an-instance.md) - [cobalt api instance environment variables](/docs/api-env-variables.md) - [cobalt api documentation](/docs/api.md) From 058a9720726a703fbbcac65e831a6f9109083005 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:29:58 +0530 Subject: [PATCH 09/11] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2fed0fc6..946ba956 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ this monorepo includes source code for api, frontend, and related packages: it also includes documentation in the [docs tree](/docs/): - [how to run a cobalt instance](/docs/run-an-instance.md) -- [installing SSL certificate for Instance](docs/SSL-certificate-using-Traefik .md) +- [installing SSL certificate for Instance](docs/SSL-certificate-using-Traefik.md) - [how to protect a cobalt instance](/docs/protect-an-instance.md) - [cobalt api instance environment variables](/docs/api-env-variables.md) - [cobalt api documentation](/docs/api.md) From 5bcb60e5f4fead7f0f88555918be9c9376b758a1 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:30:59 +0530 Subject: [PATCH 10/11] Update README.md From 2870d3a833c6ee930bc372905cf3a8e1cc860019 Mon Sep 17 00:00:00 2001 From: Syed Mufeth <117529070+Mufeth7@users.noreply.github.com> Date: Wed, 2 Apr 2025 18:31:18 +0530 Subject: [PATCH 11/11] Rename SSL-certificate-using-Traefik .md to SSL-certificate-using-Traefik.md --- ...ificate-using-Traefik .md => SSL-certificate-using-Traefik.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs/{SSL-certificate-using-Traefik .md => SSL-certificate-using-Traefik.md} (100%) diff --git a/docs/SSL-certificate-using-Traefik .md b/docs/SSL-certificate-using-Traefik.md similarity index 100% rename from docs/SSL-certificate-using-Traefik .md rename to docs/SSL-certificate-using-Traefik.md