WongSaang / chatgpt-ui

A ChatGPT web client that supports multiple users, multiple languages, and multiple database connections for persistent data storage. Provides Docker images and quick deployment scripts.
https://wongsaang.github.io/chatgpt-ui/
MIT License
1.45k stars 321 forks source link

Running behind Traefik proxy in Docker Swarm with Postgres #241

Closed amirhmoradi closed 12 months ago

amirhmoradi commented 12 months ago

This helps run the project in a docker SWARM, behind Traefik Reverse Proxy (traefik manages ssl, and you can add middlewares to add basic auth, ip limits and other features.) To make this work in Single Docker daemon (no swarm); move the 'labels' key to each service's top level and remove the 'deploy' keys in 'clien' and 'backend-web-server' services.

This file contains a Postgres DB service, make sure to set its corresponding env vars in your .env variables, and have the volume mount directory created. In this example, we mount into the db, the local directory: /data/EXAMPLE/containers/apps/chatgpt/db/

Note: You need to have the 'proxy_external' network already created and setup correctly in your Traefik configurations (out of scope here) Note: The domain example.com shall be updated and setup correctly in you DNS. Note: The platform key in each service has been disabled as it creates incompatibility in swarm.