# Coolify + Gitea Walkthrough

This repository is set up so:
- `upstream` = GitHub source (`https://github.com/otangid/muslim-api.git`)
- `origin` = your Gitea repo (`https://git.backoffice.biz.id/dwindown/muslim-api.git`)

## 1) One-time remote setup

Run from this repo root:

```bash
git remote rename origin upstream
git remote add origin https://git.backoffice.biz.id/dwindown/muslim-api.git
git remote -v
```

Expected:
- `upstream` points to GitHub
- `origin` points to Gitea

## 2) First push to Gitea

After your local commit is ready:

```bash
git push -u origin main
```

## 3) Command flow for each update

When GitHub has new commits and you want to redeploy via Coolify:

```bash
git checkout main
git fetch upstream
git pull --ff-only upstream main
git push origin main
```

Coolify will redeploy when it detects the new commit on your Gitea branch.

## 4) Optional quick checks before push

```bash
git status
git log --oneline --decorate -n 5
```

## Notes

- App startup now does not require a physical `.env` file.
- Server uses `PORT` from environment, with fallback to `3000`.
- Configure your runtime environment variables in Coolify UI.
