This guide explains how to deploy the latest-ui project using Docker and GitHub Container Registry (GHCR).
- Docker and Docker Compose installed on your server
- GitHub account with access to this repository
- Ubuntu ARM server for deployment
- Build: GitHub Actions builds ARM64 Docker images on push to
master/main - Registry: Images are stored in GitHub Container Registry (GHCR)
- Deploy: Pull and run images using Docker Compose on your server
bun run docker:build# Create a .env file first (copy from .env.example)
cp .env.example .env
# Run the container
bun run docker:runOr use Docker Compose:
docker-compose upThe GitHub Actions workflow (.github/workflows/docker-build.yml) automatically:
- Builds a Docker image for ARM64 architecture on native ARM runners
- Pushes to GHCR on every push to
master/mainbranch - Creates version tags based on git tags
The workflow uses ubuntu-24.04-arm runners for native ARM builds, which is faster and more efficient than cross-compilation.
By default, GHCR images are private. To make it public:
- Go to your repository on GitHub
- Click "Packages" in the right sidebar
- Click on the
latest-uipackage - Click "Package settings"
- Scroll down and click "Change visibility"
- Select "Public"
On your Ubuntu ARM server:
# Create a GitHub Personal Access Token with read:packages scope
# Then login to GHCR
echo $GITHUB_TOKEN | docker login ghcr.io -u USERNAME --password-stdin# Create a .env file with your configuration
cat > .env << EOF
PORT=3000
DOMAIN=yourdomain.com
NODE_ENV=production
EOFThe docker-compose.yml is already in the repository. You can modify it or use as-is.
# Pull the latest image
docker-compose pull
# Start the service
docker-compose up -d
# View logs
docker-compose logs -f latest-ui
# To stop the service
docker-compose downWhen a new version is pushed to GitHub, the image is automatically built and pushed to GHCR. To update your deployment:
# Pull the latest image and restart
docker-compose pull && docker-compose up -d
# Or use the one-liner
docker-compose pull && docker-compose down && docker-compose up -dConfigure these in your .env file:
| Variable | Description | Default |
|---|---|---|
PORT |
The port the server listens on | 3000 |
DOMAIN |
Your domain name | localhost |
NODE_ENV |
Node environment | production |
If you want to use Nginx as a reverse proxy:
server {
listen 80;
server_name yourdomain.com;
location / {
proxy_pass http://localhost:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}docker-compose logs -fdocker-compose psdocker-compose restartdocker-compose up -d --builddocker-compose exec latest-ui sh- Set appropriate environment variables in
.env - Configure domain/DNS settings
- Set up SSL/TLS (use Certbot or Cloudflare)
- Configure firewall rules
- Set up monitoring and logging
- Configure backup strategy
- Test application thoroughly
- Set up health checks
- Never commit
.envfiles to git - Use GitHub Secrets for sensitive data in workflows
- Keep your Personal Access Token secure
- Regularly update dependencies and base images
- Use specific image tags instead of
latestin production