Deployment
A guide to deploy your project
Getting Your Project Ready
Section titled “Getting Your Project Ready”First make sure you project has no linter errors and is buildable.
# lintddev pnpm lint
# buildddev pnpm buildThe next step is to ensure the .env.example and package.json is up to date.
Coolify
Section titled “Coolify”- create new environment with the project name
- depending on the type (staging or production) click on or create the environment
- create and deploy a database
Postgres - create the application (Git based private repository)
- find repository and select
- select
docker
General Tab
Section titled “General Tab”- change name to project name
- update domain name and setup up direction
Environment Tab
Section titled “Environment Tab”- copy and paste values from .env.example and update everything to the correct values
- check the box
Use Docker Build Secrets
Persistent Storage Tab
Section titled “Persistent Storage Tab”- add
volume mountwith namenextand destination path/app/.next/cache - add
directory mountwith source<coolify-path>/mediaand destination/app/media - ssh into server and update permissions of directory mount folder to 777
cd /data/coolify/applications/<application-id>
chmod 777 mediaHealth Check Tab
Section titled “Health Check Tab”- enable health check on path
/healthcheck
Deploy
Section titled “Deploy”- click deploy button and see if deployment is successful