From daf903ec49ae92902074b676cba22edccd25dedc Mon Sep 17 00:00:00 2001 From: Pagwin Date: Fri, 15 Sep 2023 17:13:05 -0400 Subject: [PATCH 1/3] almost works need to tweak the comments backend slightly --- docker-compose.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..f3c7488 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,37 @@ +version: "3" +# copied from the docker-compose I wrote specifically for the comments backend which was made referencing the invidious docker compose file which was very helpful https://github.com/iv-org/invidious/blob/master/docker-compose.yml +services: + website: + image: ghcr.io/pagwin-fedora/website_frontend:latest-comments + restart: unless-stopped + ports: + - "8080:80" + depends_on: + - comments_backend + # need to specifically name it this unless you want to build the docker image in place + comments_backend: + image: ghcr.io/pagwin-fedora/comments_backend + restart: unless-stopped + environment: + DB_URI: comments-db + DB_PORT: 5432 + DB_USER: kemal + DB_PASSWORD: kemal + DB_NAME: comments + DB_SSL: disable + depends_on: + - comments-db + comments-db: + image: docker.io/library/postgres:15 + restart: unless-stopped + volumes: + - postgresdata:/var/lib/postgresql/data + environment: + POSTGRES_DB: comments + # yes I'm stealing the invidious postgres user + POSTGRES_USER: kemal + POSTGRES_PASSWORD: kemal + healthcheck: + test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"] +volumes: + postgresdata: From b39457e4c56a874375a1a431a3e40e11a1598bcc Mon Sep 17 00:00:00 2001 From: Pagwin Date: Fri, 20 Oct 2023 15:51:07 -0400 Subject: [PATCH 2/3] changed the index of my blog a bit --- content/_index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/_index.md b/content/_index.md index cbd2a92..146eff8 100644 --- a/content/_index.md +++ b/content/_index.md @@ -2,5 +2,5 @@ title: "Pagwin's website" description: "refer to the title" --- -Hi this is my website, not quite sure what to do with it quite yet but for now it exists +Hi this is my website, I put blogs here :D. From 2441610b519394c326aecc0f4d079cbf7c8961cf Mon Sep 17 00:00:00 2001 From: Pagwin Date: Fri, 10 Nov 2023 23:41:27 -0500 Subject: [PATCH 3/3] oops --- docker-compose.yml | 4 ++-- scripts/template_convert.py | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f3c7488..cfeefde 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,10 +2,10 @@ version: "3" # copied from the docker-compose I wrote specifically for the comments backend which was made referencing the invidious docker compose file which was very helpful https://github.com/iv-org/invidious/blob/master/docker-compose.yml services: website: - image: ghcr.io/pagwin-fedora/website_frontend:latest-comments + image: ghcr.io/pagwin-fedora/website_frontend:latest restart: unless-stopped ports: - - "8080:80" + - "2020:80" depends_on: - comments_backend # need to specifically name it this unless you want to build the docker image in place diff --git a/scripts/template_convert.py b/scripts/template_convert.py index 3764d08..b6c58e6 100755 --- a/scripts/template_convert.py +++ b/scripts/template_convert.py @@ -9,8 +9,7 @@ back = os.environ.get(var_name) buf = str() with open(file_name+".template") as file: buf = file.read() - -if back == None: +if back == None or back == "": buf = re.sub("###{---(.|\n)*###---}", "", buf) else: # ${{\s*$var_name\s*}}