From 4d05ff3ea63792f44743f9e921bccfe93deeb7cf Mon Sep 17 00:00:00 2001 From: Damien Arnodo Date: Wed, 7 Jan 2026 14:14:53 +0000 Subject: [PATCH] docs: add README with deployment instructions --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..70915b1 --- /dev/null +++ b/README.md @@ -0,0 +1,55 @@ +# Netbox Deployment + +GitOps deployment for Netbox with Tailscale HTTPS access. + +## Prerequisites + +### PostgreSQL Database + +Connect to your PostgreSQL server and create the database: + +```sql +CREATE DATABASE netbox; +CREATE USER netbox WITH PASSWORD 'your-secure-password'; +GRANT ALL PRIVILEGES ON DATABASE netbox TO netbox; +ALTER DATABASE netbox OWNER TO netbox; +``` + +### Tailscale Configuration + +Download the serve configuration (first time only): + +```bash +curl -o serve-config.json https://gitea.arnodo.fr/Damien/netbox-deployment/raw/branch/main/serve-config.json +``` + +Place `serve-config.json` in the stack directory before deployment. + +### Generate Secret Key + +```bash +python3 -c "import secrets; print(secrets.token_urlsafe(50))" +``` + +## Portainer Environment Variables + +| Variable | Description | +|----------|-------------| +| `TS_AUTHKEY` | Tailscale auth key (reusable, ephemeral recommended) | +| `DB_PASSWORD` | PostgreSQL password for netbox user | +| `SECRET_KEY` | Django secret key (generate with command above) | +| `SUPERUSER_NAME` | Initial admin username | +| `SUPERUSER_EMAIL` | Initial admin email | +| `SUPERUSER_PASSWORD` | Initial admin password | +| `SKIP_SUPERUSER` | Set to `true` after first deployment | + +## Deployment + +1. Create a new stack in Portainer +2. Point to this repository +3. Configure environment variables +4. Deploy + +## Access + +Once deployed: https://netbox.taila5ad8.ts.net