chore: add .gitignore and README
Infrastructure files for staging deployment pipeline. The post-receive hook on the staging server will build and deploy automatically when PRs are merged to main. Made-with: Cursor
This commit is contained in:
28
.gitignore
vendored
Normal file
28
.gitignore
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# Environment files — never commit secrets
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
|
|
||||||
|
# Python
|
||||||
|
__pycache__/
|
||||||
|
*.py[cod]
|
||||||
|
*.pyo
|
||||||
|
.venv/
|
||||||
|
venv/
|
||||||
|
env/
|
||||||
|
*.egg-info/
|
||||||
|
dist/
|
||||||
|
build/
|
||||||
|
|
||||||
|
# Poetry
|
||||||
|
poetry.lock
|
||||||
|
|
||||||
|
# OS
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
*.tar
|
||||||
31
README.md
Normal file
31
README.md
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# EnCoach Backend — v2
|
||||||
|
|
||||||
|
## Branching Workflow
|
||||||
|
|
||||||
|
This repo is connected to the staging server via a Git post-receive hook.
|
||||||
|
**All deployment is automatic — but only after code review approval.**
|
||||||
|
|
||||||
|
### How to contribute
|
||||||
|
|
||||||
|
1. Never push directly to `main` — branch protection will block it.
|
||||||
|
2. Create a feature or fix branch:
|
||||||
|
```bash
|
||||||
|
git checkout -b feature/your-feature-name
|
||||||
|
```
|
||||||
|
3. Develop, commit, and push your branch:
|
||||||
|
```bash
|
||||||
|
git push origin feature/your-feature-name
|
||||||
|
```
|
||||||
|
4. Open a **Pull Request** on Gitea targeting `main`.
|
||||||
|
5. Request review from **devops (Talal)**.
|
||||||
|
6. Once approved and merged, the staging server rebuilds and redeploys automatically.
|
||||||
|
|
||||||
|
### Environment
|
||||||
|
|
||||||
|
The `.env` file is **not committed**. It lives only on the staging server at `/opt/encoach/backend-v2/.env`.
|
||||||
|
Contact the team lead if you need a local copy of the environment variables.
|
||||||
|
|
||||||
|
### Required files (push with your code)
|
||||||
|
|
||||||
|
- `Dockerfile` — used by the staging server to build the container image
|
||||||
|
- `docker-compose.yml` — defines the backend service (port mapping, env vars, etc.)
|
||||||
Reference in New Issue
Block a user