From a365a5167c2922b442a94dd3f3681c850941883d Mon Sep 17 00:00:00 2001 From: Felix Faerber Date: Wed, 27 May 2026 12:12:59 +0300 Subject: [PATCH] expose prisma studio at prisma.t4t-gateway.com Run `prisma studio` alongside the migrate step so the prod_prisma service serves the data browser. Behind Traefik basicauth (admin-auth middleware defined on the traefik service). Co-Authored-By: Claude Opus 4.7 (1M context) --- hostinger/prod-stack.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/hostinger/prod-stack.yaml b/hostinger/prod-stack.yaml index 1729132..29a0cd1 100644 --- a/hostinger/prod-stack.yaml +++ b/hostinger/prod-stack.yaml @@ -87,22 +87,32 @@ services: prisma: image: ghcr.io/token-for-token/hosted-gateway:main - command: ["sh", "-c", "bunx prisma migrate deploy && tail -f /dev/null"] + command: ["sh", "-c", "bunx prisma migrate deploy && bunx prisma studio --port 5555 --hostname 0.0.0.0 --browser none"] env_file: - .env environment: DATABASE_URL: postgresql://hosted:hosted@postgres:5432/hosted_gateway?schema=public networks: - internal + - public deploy: replicas: 1 restart_policy: condition: on-failure resources: limits: - memory: 256M + memory: 512M reservations: - memory: 128M + memory: 256M + labels: + - "traefik.enable=true" + - "traefik.docker.network=public" + - "traefik.constraint-label=public" + - "traefik.http.routers.prisma.rule=Host(`prisma.t4t-gateway.com`)" + - "traefik.http.routers.prisma.entrypoints=websecure" + - "traefik.http.routers.prisma.tls.certresolver=le" + - "traefik.http.services.prisma.loadbalancer.server.port=5555" + - "traefik.http.routers.prisma.middlewares=admin-auth" logging: driver: loki options: