All checks were successful
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 2s
1.6 KiB
1.6 KiB
SOP: Deploying a New Application
This guide outlines the workflow for adding a new service to the homelab.
1. Database Provisioning (Postgres)
Most apps use the centralized global_postgres instance.
- Update Config: Add the new database to the environment list in
/opt/docker/global-db/compose.yamlfor documentation. - Manual Provisioning: Run the following commands to create the database and user on the live instance:
# Access the Postgres CLI docker exec -it global_postgres psql -U postgres # Run these SQL commands: CREATE DATABASE app_name; CREATE USER app_name WITH PASSWORD 'secure-password'; GRANT ALL PRIVILEGES ON DATABASE app_name TO app_name; ALTER DATABASE app_name OWNER TO app_name;
2. Container Setup
- Directory: Create a new directory under
/opt/docker/app_name. - Compose File: Draft a
compose.yamlfile.- Ensure it joins the
web_gateway(for Cloudflare) anddb_network(for Postgres). - Use environment variables for DB credentials.
- Ensure it joins the
- Deployment: Run
docker compose up -d.
3. Networking & Security
- Cloudflare Tunnel:
- Log in to Cloudflare Zero Trust Dashboard.
- Navigate to Access > Tunnels.
- Add a Public Hostname for the service (e.g.,
app.davisdre.com).
- Access Policy (Optional): Add a Cloudflare Access Policy if MFA or WARP is required for this specific app.
4. Integration
- Dashboard:
- Add the new app link to the Antigravity Dashboard on your local PC.
git pushthe changes.- On Linode, run
updatedashto reflect changes.