From 4aff642c51d46848bd7cc00dc96193cb9759bfb1 Mon Sep 17 00:00:00 2001 From: WayfinderAK Date: Thu, 7 May 2026 13:55:20 -0800 Subject: [PATCH] Add Portainer deployment files --- PORTAINER_DEPLOYMENT.md | 26 ++++++++++++++++++++++++++ portainer-app.env | 4 ++++ portainer-stack.yml | 9 +++++++++ 3 files changed, 39 insertions(+) create mode 100644 PORTAINER_DEPLOYMENT.md create mode 100644 portainer-app.env create mode 100644 portainer-stack.yml diff --git a/PORTAINER_DEPLOYMENT.md b/PORTAINER_DEPLOYMENT.md new file mode 100644 index 0000000..c441129 --- /dev/null +++ b/PORTAINER_DEPLOYMENT.md @@ -0,0 +1,26 @@ +# Portainer deployment notes + +Generated from the current Kubernetes deployment in namespace `discord-bots`. Secret values are in the local `portainer-*.env` files. + +## Kubernetes source + +- Deployment: `goff` +- Replicas: `1` +- Rolling update: maxSurge `1`, maxUnavailable `1` +- minReadySeconds: `120` +- Labels/selectors: `app=goff` +- Image pull secrets: `none required for Portainer stack` + +## Containers + +- `pgbouncer`: image `timoha/pgbouncer:1.15.0`; env: DATABASE_URL, SERVER_TLS_SSLMODE, AUTH_TYPE; ports: 5432; requests: {'cpu': '500m', 'memory': '256Mi'}; limits: {'cpu': '1', 'memory': '512Mi'} +- `goff`: image `gitea.wayfinderak.com/wayfinderak/goff:latest`; env: DATABASE_URL, DISCORDGO_TOKEN, GOFF_EMAIL_USERNAME, GOFF_EMAIL_PASSWORD; ports: none; requests: {'cpu': '1', 'memory': '512Mi'}; limits: {'cpu': '2', 'memory': '1Gi'} + +## Portainer files + +- `portainer-stack.yml` - Docker Compose stack to paste/use in Portainer. +- `portainer-app.env` - bot runtime secrets/env. + +## Portainer database connection + +This Portainer stack does not include pgbouncer. `DATABASE_URL` in `portainer-app.env` points directly at the external PostgreSQL service copied from the Kubernetes pgbouncer upstream URL. diff --git a/portainer-app.env b/portainer-app.env new file mode 100644 index 0000000..3fa812a --- /dev/null +++ b/portainer-app.env @@ -0,0 +1,4 @@ +DATABASE_URL=postgresql://goff:DCkTm6Nns9hi8j@10.0.0.202:5432/goff +DISCORDGO_TOKEN=NjkyOTA4MTM5NTA2NDM0MDY1.Xn1W_g.SKCxfilgBc2PFCYvK2pXhqme_fc +GOFF_EMAIL_USERNAME=goff@djpianalto.com +GOFF_EMAIL_PASSWORD=1MzV9VU8u4J2 diff --git a/portainer-stack.yml b/portainer-stack.yml new file mode 100644 index 0000000..3eecca0 --- /dev/null +++ b/portainer-stack.yml @@ -0,0 +1,9 @@ +services: + goff: + image: gitea.wayfinderak.com/wayfinderak/goff:latest + container_name: goff + restart: unless-stopped + env_file: + - ./portainer-app.env + mem_limit: 1g + cpus: "2.0"