Skip to content

Deploying a 4ga Boards App

Introduction

4ga Boards is a collaborative kanban-style board for managing projects and tasks. This guide shows how to containerize 4ga Boards with a Dockerfile, connect it to a database, persist uploads, and deploy it to Klutch.sh over HTTP.

Prerequisites

  • GitHub repository containing your Dockerfile.
  • PostgreSQL or MySQL database (managed or deployed separately).
  • Klutch.sh project ready in klutch.sh/app.

Project structure

.
└── Dockerfile

Sample Dockerfile

FROM 4ga/boards:latest
# Default app port
ENV PORT=3000
EXPOSE 3000

Required environment variables

  • APP_URL – public URL, e.g., https://example-app.klutch.sh
  • APP_SECRET – strong secret key
  • DB_CONNECTIONpostgres or mysql
  • DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD
  • PORT=3000

Optional environment variables

  • NODE_ENV=production
  • LOG_LEVEL=info
  • MAIL_HOST, MAIL_USER, MAIL_PASSWORD if you enable email notifications

Persistence

If you store attachments or exports locally, attach a volume:

  • Mount path: /app/storage
  • Size: based on expected attachments and exports

Networking

  • Protocol: HTTP
  • Internal port: 3000
  • Users reach https://example-app.klutch.sh while Klutch.sh routes to port 3000 inside the container.
Terminal window
curl -I http://localhost:3000

Deployment on Klutch.sh

  1. Push your Dockerfile to GitHub.
  2. In klutch.sh/app, create a new app and select GitHub as the source.
  3. Klutch.sh automatically detects the Dockerfile in the repository root.
  4. Select HTTP traffic and set the internal port to 3000.
  5. Add environment variables for APP_URL, APP_SECRET, and database connection settings. Mark secrets as sensitive.
  6. Attach a persistent volume at /app/storage if you want to keep uploads locally.
  7. Deploy. After the app starts, sign in with your admin account and create your first board.

Verification

  • UI: open https://example-app.klutch.sh and confirm the 4ga Boards UI loads.

  • Quick check:

    Terminal window
    curl -I https://example-app.klutch.sh

Next steps

  • Configure email for notifications if needed.
  • Enable database backups and, if used, volume snapshots.
  • Harden secrets by rotating APP_SECRET and database credentials periodically.