From 98b94c7ae174842d1bc20e2565fe9daf387ddcea Mon Sep 17 00:00:00 2001 From: Arya Kiran Date: Tue, 9 Jan 2024 19:22:16 +0530 Subject: [PATCH] I hate hyperpipe escaping --- privfrontends/configs/hyperpipe/entrypoint.sh | 2 ++ privfrontends/vars.yaml | 34 ++++++++++--------- 2 files changed, 20 insertions(+), 16 deletions(-) create mode 100644 privfrontends/configs/hyperpipe/entrypoint.sh diff --git a/privfrontends/configs/hyperpipe/entrypoint.sh b/privfrontends/configs/hyperpipe/entrypoint.sh new file mode 100644 index 0000000..de39256 --- /dev/null +++ b/privfrontends/configs/hyperpipe/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/sh +find /usr/share/nginx/html -type f -exec sed -i s/pipedapi.kavin.rocks/{% if server_prefix == 'eu' %}api.piped.projectsegfau.lt{%else%}pipedapi.{{server_prefix}}.projectsegfau.lt{%endif%}/g {} \; -exec sed -i s/hyperpipeapi.onrender.com/hyperpipebackend.{{ server_prefix }}.projectsegfau.lt/g {} \; && /docker-entrypoint.sh && nginx -g "daemon off;" diff --git a/privfrontends/vars.yaml b/privfrontends/vars.yaml index c1aa708..7cbf397 100644 --- a/privfrontends/vars.yaml +++ b/privfrontends/vars.yaml @@ -6,6 +6,24 @@ compose_dir: "/opt/docker-privfrontends" data_dir: "/opt/data-privfrontends" apps: groups: + hyperpipe: + needs_configs_dir: true + needs_data_dir: false + docker_settings: + services: + - name: frontend + image: codeberg.org/hyperpipe/hyperpipe + entrypoint: sh -c '/new-entrypoint.sh' + ports: + - "8843:80" + mounts: + - "{{configs_dir}}/hyperpipe/entrypoint.sh:/new-entrypoint.sh" + - name: backend + image: codeberg.org/hyperpipe/hyperpipe-backend + environment: + HYP_PROXY: "{% if server_prefix == 'eu' %}proxy.piped.projectsegfau.lt{%else%}pipedproxy.{{server_prefix}}.projectsegfau.lt{%endif%}" + ports: + - "3536:3000" anonymousoverflow: needs_configs_dir: false needs_data_dir: false @@ -241,19 +259,3 @@ apps: WATCHTOWER_POLL_INTERVAL: 3600 WATCHTOWER_MONITOR_ONLY: false WATCHTOWER_NOTIFICATION_URL: "matrix://{{watchtower_mtrx_username}}:{{watchtower_mtrx_pass}}@matrix.envs.net/" - hyperpipe: - needs_configs_dir: false - needs_data_dir: false - docker_settings: - services: - - name: frontend - image: codeberg.org/hyperpipe/hyperpipe - entrypoint: sh -c 'find /usr/share/nginx/html -type f -exec sed -i s/pipedapi.kavin.rocks/{% if server_prefix == 'eu' %}api.piped.projectsegfau.lt{%else%}pipedapi.{{server_prefix}}.projectsegfau.lt{%endif%}/g {} \; -exec sed -i s/hyperpipeapi.onrender.com/hyperpipebackend.{{ server_prefix }}.projectsegfau.lt/g {} \; && /docker-entrypoint.sh && nginx' - ports: - - "8843:80" - - name: backend - image: codeberg.org/hyperpipe/hyperpipe-backend - environment: - HYP_PROXY: "{% if server_prefix == 'eu' %}proxy.piped.projectsegfau.lt{%else%}pipedproxy.{{server_prefix}}.projectsegfau.lt{%endif%}" - ports: - - "3536:3000"