gohorsejobs/.agent/workflows/deploy-frontend.md

1.3 KiB

description
Deploy Frontend to Apolo (dev.gohorsejobs.com)

Deploy Frontend

IMPORTANT: Always use --build-arg to set production URLs. Never rely on Dockerfile defaults.

// turbo-all

Steps

  1. Login to Forgejo Registry:
podman login -u 'y@rede5.com.br' forgejo-gru.rede5.com.br
  1. Build with Production URLs:
cd /home/yamamoto/lab/gohorsejobs
podman build \
  --build-arg NEXT_PUBLIC_API_URL=https://api-tmp.gohorsejobs.com \
  --build-arg NEXT_PUBLIC_BACKOFFICE_URL=https://b-tmp.gohorsejobs.com \
  -t forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest \
  -f frontend/Dockerfile frontend/
  1. Push to Registry:
podman push forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest
  1. Deploy on Apolo:
ssh root@apolo 'podman pull forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest && systemctl restart gohorsejobs-frontend-dev'
  1. Verify:
ssh root@apolo 'systemctl status gohorsejobs-frontend-dev --no-pager | tail -5'

Environment Reference

Variable Production Value
NEXT_PUBLIC_API_URL https://api-tmp.gohorsejobs.com
NEXT_PUBLIC_BACKOFFICE_URL https://b-tmp.gohorsejobs.com
NEXT_PUBLIC_SEEDER_API_URL https://seeder.gohorsejobs.com