From 65431d9d8ffe13331bfaaf8e85064e57e5cf7893 Mon Sep 17 00:00:00 2001 From: colin Date: Fri, 21 Feb 2025 10:45:23 -0500 Subject: [PATCH] Update stack.production.yml --- stack.production.yml | 111 +++++++++++++++++++++++-------------------- 1 file changed, 60 insertions(+), 51 deletions(-) diff --git a/stack.production.yml b/stack.production.yml index c499f52..29a3ddc 100644 --- a/stack.production.yml +++ b/stack.production.yml @@ -1,59 +1,68 @@ -networks: - traefik: - external: true - portainer: - driver: overlay - -volumes: - portainer_agent_data: - driver: local - portainer_data: - driver: local - services: - portainer: - image: git.nixc.us/colin/portainer:production-portainer - command: -H tcp://tasks.portainer_agent:9001 --tlsskipverify + postiz-postgres: + image: postgres:17-alpine + environment: + POSTGRES_PASSWORD: postiz-password + POSTGRES_USER: postiz-user + POSTGRES_DB: postiz-db-local volumes: - - /var/run/docker.sock:/var/run/docker.sock - - portainer_data:/data - - /etc/localtime:/etc/localtime:ro + - /mnt/tank/persist/nixc.us/postiz/production/postiz-postgres:/var/lib/postgresql/data + networks: + - default deploy: placement: constraints: - - node.hostname == odoo - replicas: 1 - labels: - traefik.enable: "true" - traefik.http.routers.portainer.rule: Host(`portainer.odoo.nixc.us`) - traefik.http.routers.portainer.entrypoints: websecure - traefik.http.routers.portainer.service: portainer - traefik.http.routers.portainer.tls: "true" - traefik.http.routers.portainer.tls.certresolver: letsencryptresolver - traefik.http.services.portainer.loadbalancer.server.port: 9000 - traefik.docker.network: traefik - # traefik.http.routers.portainer.middlewares: authelia_authelia@docker + - node.hostname == macmini14 + + postiz-keydb: + image: eqalpha/keydb:latest + volumes: + - /mnt/tank/persist/nixc.us/postiz/production/postiz-keydb:/data + networks: + - default + deploy: + placement: + constraints: + - node.hostname == macmini14 + + postiz: + image: ghcr.io/gitroomhq/postiz-app:latest + environment: + MAIN_URL: "https://postiz.nixc.us" + FRONTEND_URL: "https://postiz.nixc.us" + NEXT_PUBLIC_BACKEND_URL: "https://postiz.nixc.us/api" + JWT_SECRET: "random string that is unique to every install - just type random characters here!" + + DATABASE_URL: "postgresql://postiz-user:postiz-password@postiz-postgres:5432/postiz-db-local" + REDIS_URL: "redis://postiz-keydb:6379" + + BACKEND_INTERNAL_URL: "http://localhost:3000" + IS_GENERAL: "true" + STORAGE_PROVIDER: "local" + UPLOAD_DIRECTORY: "/uploads" + NEXT_PUBLIC_UPLOAD_DIRECTORY: "/uploads" + volumes: + - /mnt/tank/persist/nixc.us/postiz/production/config:/config + - /mnt/tank/persist/nixc.us/postiz/production/uploads:/uploads networks: - traefik - - portainer + - default + deploy: + labels: + traefik.docker.network: traefik + traefik.enable: "true" + traefik.http.routers.postiz.entrypoints: "websecure" + traefik.http.routers.postiz.rule: Host(`postiz.nixc.us`) + traefik.http.routers.postiz.service: "postiz" + traefik.http.routers.postiz.tls: "true" + traefik.http.routers.postiz.tls.certresolver: "letsencryptresolver" + traefik.http.services.postiz.loadbalancer.server.port: "5000" + placement: + constraints: + - node.hostname == macmini14 - # portainer_agent: - # image: git.nixc.us/colin/portainer:production-agent - # environment: - # - EDGE=1 - # - EDGE_ID={{.Node.Hostname}} - # - EDGE_KEY=${PORTAINER_EDGE_KEY} - # - EDGE_INSECURE_POLL=1 - # - AGENT_CLUSTER_ADDR=tasks.portainer_agent - # volumes: - # - /var/run/docker.sock:/var/run/docker.sock - # - portainer_agent_data:/data - # deploy: - # mode: global - # placement: - # constraints: - # - node.platform.os == linux # Runs on Linux nodes only - # labels: - # - "traefik.enable=false" - # networks: - # - portainer \ No newline at end of file +networks: + default: + external: false + traefik: + external: true