admin 9f5f696fb4
All checks were successful
Registry — build, push, deploy / build-and-push (push) Successful in 17s
Registry — build, push, deploy / deploy (push) Successful in 45s
Merge pull request 'Bind staging Docker to 18088 so portproxy can own 8088.' (#68) from feature/ci-cd into master
Reviewed-on: http://host.docker.internal:3000/admin/dyolink/pulls/68
Reviewed-by: admin <admin@localhost>
2026-08-24 12:14:51 +03:30

Dyolink

Monorepo: NestJS backend (backend/), Next.js frontend (frontend/), Docker stack under infrastructure/..

Local development: see backend/README.md and frontend/README.md.

Cursor AI: project conventions for agents are in AGENTS.md, .cursor/rules/, and .cursor/skills/.


Production deploy (Docker Hub + HTTPS + Let's Encrypt)

Full step-by-step guide: infrastructure/DEPLOY.md

Minimal server setup: install Docker, create .env + secrets/, docker login, run one script.

On server (once) In repo / Docker
DNS A record → server IP docker-compose.prod.yml, nginx, certbot
docker login (private Hub) Build & push images from dev machine
secrets/database.env, secrets/backend.env Examples: database.prod.env.example, backend.prod.env.example
infrastructure/.env (DOMAIN, LETSENCRYPT_EMAIL) deploy.prod.env.example

Dev machine — build frontend with the public domain baked in, push to Docker Hub:

./infrastructure/scripts/build-and-push-prod.sh wixur.ir latest

Server — from infrastructure/:

cp deploy.prod.env.example .env          # edit DOMAIN, paths
mkdir -p ../secrets && cp database.prod.env.example ../secrets/database.env
cp backend.prod.env.example ../secrets/backend.env   # set passwords + FRONTEND_URL
docker login
chmod +x scripts/*.sh
./scripts/deploy-prod.sh

SSL is issued automatically via Certbot (scripts/init-letsencrypt.sh). Nginx config is generated from DOMAIN in .env. When you move to another domain (e.g. dyolink.com), update .env + backend.env, re-run init-letsencrypt.sh, and rebuild the frontend image with the new URL.


Staging deploy (Gitea Actions + Windows)

Full guide: infrastructure/STAGING-DEPLOY.md

Merge or push to master → Gitea Actions builds images → deploys to http://<host>:8088.

Workflow: .gitea/workflows/registry-build-deploy.yml


Path Role
backend/Dockerfile API image
frontend/Dockerfile Web image
infrastructure/STAGING-DEPLOY.md Staging setup, CI variables, testing
infrastructure/docker-compose.registry.yml Pull-only staging stack (registry images + nginx + postgres)
infrastructure/deploy.registry.env.example Template for deploy.registry.env
Description
The whole dockerized structure of the project repo
Readme 7.8 MiB
Languages
TypeScript 97.5%
Shell 1.1%
CSS 0.8%
JavaScript 0.4%
Dockerfile 0.2%