Skip to content

Deploying an ACP Admin App

Introduction

ACP Admin is a lightweight admin console for managing users, roles, and application data. This guide shows how to containerize ACP Admin with a Dockerfile, configure a database connection, persist uploads/configuration, 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 node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install --production
COPY . .
ENV PORT=3000
EXPOSE 3000
CMD ["npm", "start"]

Required environment variables

  • APP_URL – public URL, e.g., https://example-app.klutch.sh
  • APP_SECRET – strong secret for sessions/JWT
  • 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 storing uploads or exported data locally, attach a volume:

  • Mount path: /app/storage
  • Size: based on expected uploads/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 your database credentials. Mark secrets as sensitive.
  6. Optionally attach a persistent volume at /app/storage to keep uploads or exports.
  7. Deploy. After the app starts, sign in with your admin account and configure roles, permissions, and integrations.

Verification

  • UI: open https://example-app.klutch.sh and confirm the ACP Admin login page loads.

  • Quick check:

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

Next steps

  • Configure email for password resets and notifications.
  • Enable backups for the database and any attached storage.
  • Rotate secrets (APP_SECRET, DB credentials) regularly for better security.