Deployeur is a lightweight yet powerful deployment tool designed specifically for indie hackers who struggle to set up CI/CD on shared hosting environments. It simplifies the deployment process by automating updates, executing necessary build steps, and maintaining a streamlined workflow—all from a dedicated subdomain.
Deployeur operates from a subdomain that points to the script's root folder, allowing seamless access to deployment functions via the web. With minimal setup, you can trigger deployments securely using an API request, ensuring your application stays up to date with minimal hassle.
/deployeur/
├── script/
│ ├── deploy.sh # Main deployment script
│ ├── deploy.yml # YAML configuration file for deployment commands
│ ├── log.txt # Deployment log file
├── tmp/ # Temporary storage during deployment
├── vendor/ # Dependencies
.env.example # Example environment variables file
index.php # Web-triggered deployment script
setup.sh # Interactive setup script
Deployeur is lightweight and can run on almost any shared hosting with the following minimum requirements:
- PHP 8.2 or later
- SSH access (optional but recommended)
exec()
function enabled in PHP- Git installed on the server
- Composer & Node.js installed (if using frameworks that require it)
- Set up a subdomain (e.g.,
deploy.yourdomain.com
) in your hosting control panel. - Download the latest stable release inside the subdomain root:
cd /home/demo/awesome-deployer
tar -xzf <(curl -sL $(curl -s https://api.github.com/repos/ElvisAns/Deployeur/releases/latest | grep tarball_url | cut -d '"' -f 4)) --strip-components=1
Deployeur now includes an interactive setup script that configures the environment variables for you. Simply run:
bash setup.sh
This script will prompt you to enter:
DEPLOY_TOKEN
PROJECT_FOLDER
REPO_URL
DEPLOYER_FOLDER
TMP_FOLDER
LOG_FILE
DEPLOY_YML
GIT_USERNAME
GIT_EMAIL
If a .env
file already exists, the script will warn you and ask for confirmation before backing it up as .env.backup
.
Ensure the script has execution permission:
chmod +x /home/demo/awesome-deployer/deployer/script/deploy.sh
The web server user must also have permission to execute the script and modify files in PROJECT_FOLDER
.
If you do not have access to cPanel’s terminal, you can install Deployeur via SSH. Simply connect to your server using:
Then follow the same installation steps as above.
- The script checks for
.deployer.lock
to prevent multiple deployments from running simultaneously. - If
deployment.initiated
does not exists, it:- Moves everything (except
deployer
,vendor
, andnode_modules
) to/deployer/tmp/
. - Deletes
vendor
andnode_modules
. - Clones the repository into
PROJECT_FOLDER
. - Restores necessary files from
/deployer/tmp/
. - Commits any restored changes.
- Moves everything (except
- Executes the commands specified in
deploy.yml
(e.g.,git pull
,npm install
,composer install
,npm run build
). - Logs the deployment status.
You can trigger deployment automatically when you push changes to your repository using GitHub Actions:
Go to GitHub > Your Repository > Settings > Secrets and Variables > Actions and add a new repository secret:
- Name:
DEPLOY_TOKEN
- Value:
your_secret_token
Create a .github/workflows/deploy.yml
file in your repository with the following content:
name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Trigger Deployeur
run: |
curl -H "x-deploy-token: ${{ secrets.DEPLOY_TOKEN }}" http://deploy.yourdomain.com/index.php
All actions and outputs are logged in log.txt
for debugging and tracking.
- Ensure
DEPLOY_TOKEN
is kept secret to prevent unauthorized deployments. - The deployment script should only be writable by trusted users.
- The deployment process runs under the web server user, so make sure permissions are correctly set.
- If deployment fails, check
log.txt
for errors. - Ensure the web server user has permission to execute
deploy.sh
and modifyPROJECT_FOLDER
. - Verify that
.env
is correctly configured and contains valid values.
This deployment system is licensed under MIT.
Ansima