---
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:
```bash
podman login -u 'y@rede5.com.br' forgejo-gru.rede5.com.br
```

2. Build with Production URLs:
```bash
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/
```

3. Push to Registry:
```bash
podman push forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest
```

4. Deploy on Apolo:
```bash
ssh root@apolo 'podman pull forgejo-gru.rede5.com.br/rede5/gohorsejobs-frontend:latest && systemctl restart gohorsejobs-frontend-dev'
```

5. Verify:
```bash
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` |
