Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nodebb service #4624

Merged
merged 2 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions public/svgs/nodebb.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions templates/compose/nodebb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 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
command: >
/bin/bash -c "
cat > /usr/src/app/setup.json <<EOL
{
\"defaults\": {
\"postgres\": {
\"host\": \"postgres\",
\"port\": 5432,
\"database\": \"nodebb\",
\"username\": \"${SERVICE_USER_POSTGRES}\",
\"password\": \"${SERVICE_PASSWORD_POSTGRES}\"
}
}
}
EOL
&& tini -- entrypoint.sh
"
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:
privlol marked this conversation as resolved.
Show resolved Hide resolved
POSTGRES_USER: ${SERVICE_USER_POSTGRES}
POSTGRES_PASSWORD: ${SERVICE_PASSWORD_POSTGRES}
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
Loading