From c3a76fe4e7bbfd60a0564514cc1c0a2c676b1f1c Mon Sep 17 00:00:00 2001 From: privlol Date: Wed, 18 Dec 2024 15:29:00 -0500 Subject: [PATCH 1/2] Added nodebb service --- public/svgs/nodebb.svg | 16 ++++++++++ templates/compose/nodebb.yaml | 60 +++++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 public/svgs/nodebb.svg create mode 100644 templates/compose/nodebb.yaml diff --git a/public/svgs/nodebb.svg b/public/svgs/nodebb.svg new file mode 100644 index 0000000000..cc1c56f881 --- /dev/null +++ b/public/svgs/nodebb.svg @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/templates/compose/nodebb.yaml b/templates/compose/nodebb.yaml new file mode 100644 index 0000000000..dba35ee6ba --- /dev/null +++ b/templates/compose/nodebb.yaml @@ -0,0 +1,60 @@ +# ignore: false +# documentation: https://docs.nodebb.org/ +# slogan: A next-generation discussion platform. +# tags: communication, forums, discussion +# logo: svgs/nodebb.svg +# port: 4567 + +services: + nodebb: + image: ghcr.io/nodebb/nodebb:latest + restart: unless-stopped + environment: + - SERVICE_FQDN_nodebb_4567 + volumes: + - nodebb-build:/usr/src/app/build + - nodebb-uploads:/usr/src/app/public/uploads + - nodebb-config:/opt/config + - type: bind + source: ./.docker/config/setup.json + target: /usr/src/app/setup.json + isDirectory: false + content: | + { + "defaults": { + "postgres": { + "host": "postgres", + "port": 5432, + "database": "nodebb", + "username": "nodebb", + "password": "nodebb" + } + } + } + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:4567"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 30s + + postgres: + image: postgres:17.2-alpine + restart: unless-stopped + environment: + POSTGRES_USER: nodebb + POSTGRES_PASSWORD: nodebb + POSTGRES_DB: nodebb + volumes: + - postgres-data:/var/lib/postgresql/data + healthcheck: + test: [ "CMD-SHELL", "pg_isready -U nodebb", "-d", "nodebb" ] + interval: 5s + retries: 10 + timeout: 2s + +volumes: + postgres-data: + nodebb-build: + nodebb-uploads: + nodebb-config: \ No newline at end of file From a8304ce34a4ca74440587798b7c9f6bff79fd326 Mon Sep 17 00:00:00 2001 From: PrivLol Date: Sat, 21 Dec 2024 15:32:57 -0500 Subject: [PATCH 2/2] Fixed according to report --- templates/compose/nodebb.yaml | 44 +++++++++++++++-------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/templates/compose/nodebb.yaml b/templates/compose/nodebb.yaml index dba35ee6ba..ba964c832a 100644 --- a/templates/compose/nodebb.yaml +++ b/templates/compose/nodebb.yaml @@ -1,4 +1,3 @@ -# ignore: false # documentation: https://docs.nodebb.org/ # slogan: A next-generation discussion platform. # tags: communication, forums, discussion @@ -10,27 +9,28 @@ services: image: ghcr.io/nodebb/nodebb:latest restart: unless-stopped environment: - - SERVICE_FQDN_nodebb_4567 + - SERVICE_FQDN_NODEBB_4567 volumes: - nodebb-build:/usr/src/app/build - nodebb-uploads:/usr/src/app/public/uploads - nodebb-config:/opt/config - - type: bind - source: ./.docker/config/setup.json - target: /usr/src/app/setup.json - isDirectory: false - content: | - { - "defaults": { - "postgres": { - "host": "postgres", - "port": 5432, - "database": "nodebb", - "username": "nodebb", - "password": "nodebb" - } + command: > + /bin/bash -c " + cat > /usr/src/app/setup.json <