Skip to content

luvnationdev/lnfoot-infra-deploy

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

86 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

infra-deploy

Infrastructure Deployment Repository for LN Foot Project

This repository automates the deployment of the entire LN Foot platform, including:

  • πŸ”Œ API backend
  • πŸ›‘ Keycloak (Identity provider)
  • ☁️ MinIO (Object storage)
  • 🌐 Caddy (Reverse proxy + HTTPS)
  • Vercel Fontends (lnfoot.vercel.app, admin-ln-foot.vercel.app)

πŸ“ Project Structure


docker/
β”œβ”€β”€ Caddyfile                     # Reverse proxy config (Caddy)
β”œβ”€β”€ compose.yml                   # Main Docker Compose file
β”œβ”€β”€ keycloak/
β”‚   β”œβ”€β”€ config/
β”‚      β”œβ”€β”€ realm.theme.ln-foot-01.json
β”œβ”€β”€ .env # environment variables

πŸš€ Deployment Workflow

Deployment is automated via GitHub Actions and triggered when version tags are pushed from the following service repositories:

Service Example Repo Name Tag Format Example Tag
API lnfoot-api api-vX.Y.Z api-v0.9.5

Upon receiving a tag:

  1. The corresponding Docker image is pulled from GHCR.
  2. Docker Compose is restarted with the new image tag.
  3. Other infrastructure services (Keycloak, MinIO, Caddy) remain unchanged unless manually updated.

πŸ”§ Server Requirements

Make sure your VPS or bare-metal server has:

  • Docker
  • Docker Compose
  • Open ports: 80/443, 5432 (Postgres), 9000 (MinIO), 8080/8443 (Keycloak)
  • Domain configured (if using Caddy with HTTPS)

πŸ” GitHub Secrets

Set the following secrets in your infra-deploy repo β†’ Settings β†’ Secrets and Variables β†’ Actions:

Secret Name Description
VPS_HOST IP or domain of the VPS
VPS_USER SSH username (e.g. ubuntu)
VPS_SSH_PRIVATE_KEY Private SSH key to connect to the VPS
GHCR_TOKEN Personal access token to pull GHCR images

πŸ“œ Docker Compose Environment

  • Keycloak uses its own docker/.env file: .env

πŸ›  Local Development

You can test the infrastructure locally with:

cd docker
docker compose --env-file keycloak/config.env --env-file minio/config.env up -d

Make sure to:

  • Configure your /etc/hosts file for local domains used by Caddy.
  • Provide valid .env values for each service.

🧩 Adding a New Service

To add a new service to the infra:

  1. Update docker/compose.yml
  2. Add any necessary .env files under docker/.env
  3. Update GitHub Actions workflows (if needed)

πŸ“„ License

MIT License β€” maintained by LN Foot team

About

Luvnation Sport Application deployment infrastucture

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • CSS 72.7%
  • Shell 27.3%