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
.└── DockerfileSample Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./RUN npm install --production
COPY . .
ENV PORT=3000EXPOSE 3000
CMD ["npm", "start"]Required environment variables
APP_URL– public URL, e.g.,https://example-app.klutch.shAPP_SECRET– strong secret for sessions/JWTDB_CONNECTION–postgresormysqlDB_HOST,DB_PORT,DB_NAME,DB_USER,DB_PASSWORDPORT=3000
Optional environment variables
NODE_ENV=productionLOG_LEVEL=infoMAIL_HOST,MAIL_USER,MAIL_PASSWORDif 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.shwhile Klutch.sh routes to port3000inside the container.
Health check (recommended)
curl -I http://localhost:3000Deployment on Klutch.sh
- Push your Dockerfile to GitHub.
- In klutch.sh/app, create a new app and select GitHub as the source.
- Klutch.sh automatically detects the Dockerfile in the repository root.
- Select HTTP traffic and set the internal port to
3000. - Add environment variables for
APP_URL,APP_SECRET, and your database credentials. Mark secrets as sensitive. - Optionally attach a persistent volume at
/app/storageto keep uploads or exports. - Deploy. After the app starts, sign in with your admin account and configure roles, permissions, and integrations.
Verification
-
UI: open
https://example-app.klutch.shand 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.