1.3 KiB
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
- Login to Forgejo Registry:
podman login -u 'y@rede5.com.br' forgejo-gru.rede5.com.br
- 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/
- Push to Registry:
podman push forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest
- Deploy on Apolo:
ssh root@apolo 'podman pull forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest && systemctl restart gohorsejobs-frontend-dev'
- 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 |