WongSaang/chatgpt-ui

Unable to set up the backend. With Traefik on Docker Swarm

Opened this issue · 2 comments

I've followed the documentation and tweaked docker-compose.yml to be compatible with Docker Swarm and also Traefik routing
However, I still encounter issues going to https://wsgi-backend and https://server-backend

On wsgi I get page 404, on server-backend I get Bad Gateway (because in the Docker EXPOSE 80 is specified)

If there are any other files/logs I can provide let me know

docker-compose.yml

version: "3.7"

services:
  chatgpt:
    image: wongsaang/chatgpt-ui-client:latest
    container_name: chatgpt
    restart: unless-stopped
    networks:
      - web    # The assignment for Traefik to work
      - chatgpt
    environment:
      - SERVER_DOMAIN=http://chatgpt-backend-web.home
      - PUID=1000
      - PGID=1000
      - DEBUG=True
      - DEFAULT_LOCALE=en
      - TZ=Europe/Warsaw
    depends_on:
      - chatgpt-backend-web
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.chatgpt.rule=Host(`chatgpt.home`)"
        - "traefik.http.services.chatgpt.loadbalancer.server.port=80"
        - "traefik.docker.network=web"
        - "io.portainer.accesscontrol.users=admin"
        - "traefik.http.routers.chatgpt.tls=true"

  chatgpt-backend-wsgi:
    image: wongsaang/chatgpt-ui-wsgi-server:latest
    environment:
      - APP_DOMAIN=http://chatgpt-backend-web.home:9000
      - DEBUG=True
      - SERVER_WORKERS=3 # The number of worker processes for handling requests.
      #      - DB_URL=postgres://postgres:postgrespw@localhost:49153/chatgpt # If this parameter is not set, the built-in Sqlite will be used by default. It should be noted that if you do not connect to an external database, the data will be lost after the container is destroyed.
      - DJANGO_SUPERUSER_USERNAME=admin # default superuser name
      - DJANGO_SUPERUSER_PASSWORD=password # default superuser password
      - DJANGO_SUPERUSER_EMAIL=admin@example.com # default superuser email
      - ACCOUNT_EMAIL_VERIFICATION=${ACCOUNT_EMAIL_VERIFICATION:-none} # Determines the e-mail verification method during signup – choose one of "none", "optional", or "mandatory". Default is "optional". If you don't need to verify the email, you can set it to "none".
      # If you want to use the email verification function, you need to configure the following parameters
  #   - EMAIL_HOST=SMTP server address
  #   - EMAIL_PORT=SMTP server port
  #   - EMAIL_HOST_USER=
  #   - EMAIL_HOST_PASSWORD=
  #   - EMAIL_USE_TLS=True
  #   - EMAIL_FROM=no-reply@example.com  #Default sender email address
    volumes:
      - /home/swarm/chatgpt/db.sqlite3:/app/db.sqlite3
    networks:
      - web
      - chatgpt
    restart: always
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.chatgpt-backend-wsgi.rule=Host(`chatgpt-backend-wsgi.home`)"
        - "traefik.http.services.chatgpt-backend-wsgi.loadbalancer.server.port=8000"
        - "traefik.docker.network=web"
        - "io.portainer.accesscontrol.users=admin"
        - "traefik.http.routers.chatgpt-backend-wsgi.tls=true"

  chatgpt-backend-web:
    image: wongsaang/chatgpt-ui-web-server:latest
    environment:
      - BACKEND_URL=http://chatgpt-backend-wsgi.home:8000
      - DEBUG=True
    depends_on:
      - chatgpt-backend-wsgi
    networks:
      - web
      - chatgpt
    expose: 
      - 8000 # To overwrite the EXPOSE 80 in Dockerfile. doesn't work though
    restart: always
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.chatgpt-backend-web.rule=Host(`chatgpt-backend-web.home`)"
        - "traefik.http.services.chatgpt-backend-web.loadbalancer.server.port=8000" # In Dockerfile the port that is EXPOSEd is 80
        - "traefik.docker.network=web"
        - "io.portainer.accesscontrol.users=admin"
        - "traefik.http.routers.chatgpt-backend-web.tls=true"

networks:
  chatgpt:
    driver: bridge 
    attachable: true
    name: chatgpt
  web:
    external: true
    name: web

volumes: 
  chatgpt-volume:
    driver: local 

image
image
image
image

chatgpt-client logs:

Listening http://[::]:80
(node:1) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 close listeners added to [Server]. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings ...` to show where the warning was created)

chatgpt-wsgi:

Operations to perform:
  Apply all migrations: account, admin, auth, chat, contenttypes, provider, sessions, sites, socialaccount, stats
Running migrations:
  No migrations to apply.
Setting up default settings...
CommandError: Error: That username is already taken.
[2024-01-10 14:46:39 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2024-01-10 14:46:39 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2024-01-10 14:46:39 +0000] [1] [INFO] Using worker: sync
[2024-01-10 14:46:39 +0000] [35] [INFO] Booting worker with pid: 35
[2024-01-10 14:46:39 +0000] [36] [INFO] Booting worker with pid: 36
[2024-01-10 14:46:39 +0000] [37] [INFO] Booting worker with pid: 37
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /admin/login/?next=/admin/ HTTP/1.1" 200 4031 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/fontawesome-free-6.2.0-web/css/all.min.css
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /static/admin/simpleui-x/fontawesome-free-6.2.0-web/css/all.min.css HTTP/1.1" 404 2942 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/css/login.css
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /static/admin/simpleui-x/css/login.css?_=2.1 HTTP/1.1" 404 2861 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/js/vue.min.js
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /static/admin/simpleui-x/js/vue.min.js?_=2023.03.01 HTTP/1.1" 404 2868 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/elementui/index.js
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /static/admin/simpleui-x/elementui/index.js?_=2023.03.01 HTTP/1.1" 404 2883 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/particles/app.js
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /static/admin/simpleui-x/particles/app.js HTTP/1.1" 404 2864 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/particles/particles.js
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /static/admin/simpleui-x/particles/particles.js HTTP/1.1" 404 2882 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/js/login.js
10.0.1.49 - - [10/Jan/2024:14:50:52 +0000] "GET /static/admin/simpleui-x/js/login.js?_=3.3 HTTP/1.1" 404 2855 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/img/logo.png
10.0.1.49 - - [10/Jan/2024:14:50:53 +0000] "GET /static/admin/simpleui-x/img/logo.png HTTP/1.1" 404 2852 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/elementui/theme-chalk/index.css
10.0.1.49 - - [10/Jan/2024:14:50:53 +0000] "GET /static/admin/simpleui-x/elementui/theme-chalk/index.css HTTP/1.1" 404 2909 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/img/bg.svg
��
10.0.1.49 - - [10/Jan/2024:14:50:53 +0000] "GET /static/admin/simpleui-x/img/bg.svg HTTP/1.1" 404 2846 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
�
Not Found: /
10.0.1.49 - - [10/Jan/2024:14:50:58 +0000] "GET / HTTP/1.1" 404 2726 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.0.1.49 - - [10/Jan/2024:15:02:04 +0000] "GET /admin/ HTTP/1.1" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.0.1.49 - - [10/Jan/2024:15:02:04 +0000] "GET /admin/login/?next=/admin/ HTTP/1.1" 200 4031 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/elementui/theme-chalk/index.css
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/elementui/theme-chalk/index.css HTTP/1.1" 404 2909 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/css/login.css
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/css/login.css?_=2.1 HTTP/1.1" 404 2861 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/img/logo.png
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/img/logo.png HTTP/1.1" 404 2852 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/js/vue.min.js
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/js/vue.min.js?_=2023.03.01 HTTP/1.1" 404 2868 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/elementui/index.js
Not Found: /static/admin/simpleui-x/particles/app.js
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/elementui/index.js?_=2023.03.01 HTTP/1.1" 404 2883 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/particles/app.js HTTP/1.1" 404 2864 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/particles/particles.js
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/particles/particles.js HTTP/1.1" 404 2882 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/js/login.js
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/js/login.js?_=3.3 HTTP/1.1" 404 2855 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/fontawesome-free-6.2.0-web/css/all.min.css
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/fontawesome-free-6.2.0-web/css/all.min.css HTTP/1.1" 404 2942 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
Not Found: /static/admin/simpleui-x/img/bg.svg
��
10.0.1.49 - - [10/Jan/2024:15:02:05 +0000] "GET /static/admin/simpleui-x/img/bg.svg HTTP/1.1" 404 2846 "https://chatgpt-backend-wsgi.home/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"

chatgpt-backend-server:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/01/10 14:42:37 [notice] 1#1: using the "epoll" event method
2024/01/10 14:42:37 [notice] 1#1: nginx/1.22.1
2024/01/10 14:42:37 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) 
2024/01/10 14:42:37 [notice] 1#1: OS: Linux 6.2.0-26-generic
2024/01/10 14:42:37 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/01/10 14:42:37 [notice] 1#1: start worker processes
2024/01/10 14:42:37 [notice] 1#1: start worker process 35
2024/01/10 14:42:37 [notice] 1#1: start worker process 36
2024/01/10 14:42:37 [notice] 1#1: start worker process 37
2024/01/10 14:42:37 [notice] 1#1: start worker process 38
2024/01/10 14:42:37 [notice] 1#1: start worker process 39
2024/01/10 14:42:37 [notice] 1#1: start worker process 40
2024/01/10 14:42:37 [notice] 1#1: start worker process 41
2024/01/10 14:46:27 [notice] 1#1: signal 3 (SIGQUIT) received, shutting down
2024/01/10 14:46:27 [notice] 35#35: gracefully shutting down
2024/01/10 14:46:27 [notice] 35#35: exiting
2024/01/10 14:46:27 [notice] 35#35: exit
2024/01/10 14:46:27 [notice] 36#36: gracefully shutting down
2024/01/10 14:46:27 [notice] 38#38: gracefully shutting down
2024/01/10 14:46:27 [notice] 37#37: gracefully shutting down
2024/01/10 14:46:27 [notice] 36#36: exiting
2024/01/10 14:46:27 [notice] 39#39: gracefully shutting down
2024/01/10 14:46:27 [notice] 37#37: exiting
2024/01/10 14:46:27 [notice] 38#38: exiting
2024/01/10 14:46:27 [notice] 40#40: gracefully shutting down
2024/01/10 14:46:27 [notice] 39#39: exiting
2024/01/10 14:46:27 [notice] 40#40: exiting
2024/01/10 14:46:27 [notice] 36#36: exit
2024/01/10 14:46:27 [notice] 37#37: exit
2024/01/10 14:46:27 [notice] 40#40: exit
2024/01/10 14:46:27 [notice] 38#38: exit
2024/01/10 14:46:27 [notice] 39#39: exit
2024/01/10 14:46:27 [notice] 41#41: gracefully shutting down
2024/01/10 14:46:27 [notice] 41#41: exiting
2024/01/10 14:46:27 [notice] 41#41: exit
2024/01/10 14:46:27 [notice] 1#1: signal 17 (SIGCHLD) received from 37
2024/01/10 14:46:27 [notice] 1#1: worker process 37 exited with code 0
2024/01/10 14:46:27 [notice] 1#1: worker process 40 exited with code 0
2024/01/10 14:46:27 [notice] 1#1: worker process 35 exited with code 0
2024/01/10 14:46:27 [notice] 1#1: signal 29 (SIGIO) received
2024/01/10 14:46:27 [notice] 1#1: signal 17 (SIGCHLD) received from 35
2024/01/10 14:46:27 [notice] 1#1: signal 17 (SIGCHLD) received from 41
2024/01/10 14:46:27 [notice] 1#1: worker process 38 exited with code 0
2024/01/10 14:46:27 [notice] 1#1: worker process 41 exited with code 0
2024/01/10 14:46:27 [notice] 1#1: signal 29 (SIGIO) received
2024/01/10 14:46:27 [notice] 1#1: signal 17 (SIGCHLD) received from 39
2024/01/10 14:46:27 [notice] 1#1: worker process 39 exited with code 0
2024/01/10 14:46:27 [notice] 1#1: signal 29 (SIGIO) received
2024/01/10 14:46:27 [notice] 1#1: signal 17 (SIGCHLD) received from 36
2024/01/10 14:46:27 [notice] 1#1: worker process 36 exited with code 0
2024/01/10 14:46:27 [notice] 1#1: exit
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/01/10 14:46:28 [notice] 1#1: using the "epoll" event method
2024/01/10 14:46:28 [notice] 1#1: nginx/1.22.1
2024/01/10 14:46:28 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) 
2024/01/10 14:46:28 [notice] 1#1: OS: Linux 6.2.0-26-generic
2024/01/10 14:46:28 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/01/10 14:46:28 [notice] 1#1: start worker processes
2024/01/10 14:46:28 [notice] 1#1: start worker process 27
2024/01/10 14:46:28 [notice] 1#1: start worker process 28
2024/01/10 14:46:28 [notice] 1#1: start worker process 29
2024/01/10 14:46:28 [notice] 1#1: start worker process 30
2024/01/10 14:46:28 [notice] 1#1: start worker process 31
2024/01/10 14:46:28 [notice] 1#1: start worker process 32
2024/01/10 14:46:28 [notice] 1#1: start worker process 33

I've adjusted the docker-compose.yml to limit any changes to the file

The errors might be because of ssl certificate not trusted on individual containers
So I made use of the internal chatgpt network

However it didn't fixed the issue of 404 on wsgi-backend
And the container backend-server fails to start, because It can't find the url (???)

I've set every environment variable

backend-server logs:

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/01/10 19:49:41 [emerg] 1#1: host not found in upstream "backend-wsgi-server" in /etc/nginx/conf.d/default.conf:9
nginx: [emerg] host not found in upstream "backend-wsgi-server" in /etc/nginx/conf.d/default.conf:9

docker-compose.yml

version: "3.7"

services:
  chatgpt:
    image: wongsaang/chatgpt-ui-client:latest
    restart: unless-stopped
    networks:
      - web
      - chatgpt
    environment:
      - SERVER_DOMAIN=http://backend-web-server
      - PUID=1000
      - PGID=1000
      - DEBUG=True
      - DEFAULT_LOCALE=en
      - TZ=Europe/Warsaw
    depends_on:
      - chatgpt-backend-web
    ports:
      - '${CLIENT_PORT:-81}:80'
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.chatgpt.rule=Host(`chatgpt.home`) && PathPrefix(`/`)"
        - "traefik.http.services.chatgpt.loadbalancer.server.port=80"
        - "traefik.docker.network=web"
        - "io.portainer.accesscontrol.users=admin"
        - "traefik.http.routers.chatgpt.tls=true"

  chatgpt-backend-wsgi:
    image: wongsaang/chatgpt-ui-wsgi-server:latest
    environment:
      - APP_DOMAIN=${APP_DOMAIN:-localhost:9000}
      - DEBUG=True
      - SERVER_WORKERS=3 # The number of worker processes for handling requests.
      #      - DB_URL=postgres://postgres:postgrespw@localhost:49153/chatgpt # If this parameter is not set, the built-in Sqlite will be used by default. It should be noted that if you do not connect to an external database, the data will be lost after the container is destroyed.
      - DJANGO_SUPERUSER_USERNAME=admin # default superuser name
      - DJANGO_SUPERUSER_PASSWORD=password # default superuser password
      - DJANGO_SUPERUSER_EMAIL=admin@example.com # default superuser email
      - ACCOUNT_EMAIL_VERIFICATION=${ACCOUNT_EMAIL_VERIFICATION:-none} # Determines the e-mail verification method during signup – choose one of "none", "optional", or "mandatory". Default is "optional". If you don't need to verify the email, you can set it to "none".
      # If you want to use the email verification function, you need to configure the following parameters
  #   - EMAIL_HOST=SMTP server address
  #   - EMAIL_PORT=SMTP server port
  #   - EMAIL_HOST_USER=
  #   - EMAIL_HOST_PASSWORD=
  #   - EMAIL_USE_TLS=True
  #   - EMAIL_FROM=no-reply@example.com  #Default sender email address
    volumes:
      - /home/swarm/chatgpt/db.sqlite3:/app/db.sqlite3
    networks:
      - web
      - chatgpt
    restart: always
    ports:
      - '${WSGI_PORT:-8001}:8000'
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.chatgpt-backend-wsgi.rule=Host(`chatgpt-backend-wsgi.home`) && PathPrefix(`/`)"
        - "traefik.http.services.chatgpt-backend-wsgi.loadbalancer.server.port=8000"
        - "traefik.docker.network=web"
        - "io.portainer.accesscontrol.users=admin"
        - "traefik.http.routers.chatgpt-backend-wsgi.tls=true"

  chatgpt-backend-web:
    image: wongsaang/chatgpt-ui-web-server:latest
    environment:
      - BACKEND_URL=http://backend-wsgi-server:8000
      - DEBUG=True
    depends_on:
      - chatgpt-backend-wsgi
    networks:
      - web
      - chatgpt
    restart: always
    ports:
      - '${SERVER_PORT:-9001}:80'
    deploy:
      labels:
        - "traefik.enable=true"
        - "traefik.http.routers.chatgpt-backend-web.rule=Host(`chatgpt-backend-web.home`) && PathPrefix(`/`)"
        - "traefik.http.services.chatgpt-backend-web.loadbalancer.server.port=9000" # In Dockerfile the port that is EXPOSEd is 80
        - "traefik.docker.network=web"
        - "io.portainer.accesscontrol.users=admin"
        - "traefik.http.routers.chatgpt-backend-web.tls=true"

networks:
  chatgpt:
    driver: bridge 
    attachable: true
    name: chatgpt
  web:
    external: true
    name: web

volumes: 
  chatgpt-volume:
    driver: local 

When I just use the pre-downloaded docker-compose.yml

  • Without Traefik
  • Without Docker Swarm
    With only some changed ports to avoid conflicts:

Backend runs smoothly,
But I get Bad Request 400 even though, I can access the api.openai
It's probably because I have Reverse Proxy still running on the machine, and it intercepts the requests sent my api.openai? Am I wrong?

docker-compose.yml

version: '3'
services:
  client:
    platform: linux/x86_64
    image: wongsaang/chatgpt-ui-client:latest
    environment:
      - SERVER_DOMAIN=http://backend-web-server
      - DEFAULT_LOCALE=en
#      - NUXT_PUBLIC_APP_NAME='ChatGPT UI' # The name of the application
#      - NUXT_PUBLIC_TYPEWRITER=true # Whether to enable the typewriter effect, default false
#      - NUXT_PUBLIC_TYPEWRITER_DELAY=50 # The delay time of the typewriter effect, default 50ms
    depends_on:
      - backend-web-server
    ports:
      - '${CLIENT_PORT:-81}:80'
    networks:
      - chatgpt_ui_network
    restart: always
  backend-wsgi-server:
    platform: linux/x86_64
    image: wongsaang/chatgpt-ui-wsgi-server:latest
    environment:
      - DEBUG=${DEBUG:-False} # Whether to enable debug mode, default False
      - APP_DOMAIN=${APP_DOMAIN:-localhost:9000}
      - SERVER_WORKERS=3 # The number of worker processes for handling requests.
      - WORKER_TIMEOUT=180 # Workers silent for more than this many seconds are killed and restarted. default 180s
      - DB_URL=${DB_URL:-sqlite:///db.sqlite3} # If this parameter is not set, the built-in Sqlite will be used by default. It should be noted that if you do not connect to an external database, the data will be lost after the container is destroyed.
      - DJANGO_SUPERUSER_USERNAME=admin # default superuser name
      - DJANGO_SUPERUSER_PASSWORD=password # default superuser password
      - DJANGO_SUPERUSER_EMAIL=admin@example.com # default superuser email
      - ACCOUNT_EMAIL_VERIFICATION=${ACCOUNT_EMAIL_VERIFICATION:-none} # Determines the e-mail verification method during signup – choose one of "none", "optional", or "mandatory". Default is "optional". If you don't need to verify the email, you can set it to "none".
      # If you want to use the email verification function, you need to configure the following parameters
#      - EMAIL_HOST=SMTP server address
#      - EMAIL_PORT=SMTP server port
#      - EMAIL_HOST_USER=
#      - EMAIL_HOST_PASSWORD=
#      - EMAIL_USE_TLS=True
#      - EMAIL_FROM=no-reply@example.com  #Default sender email address
    volumes:
      - ./db.sqlite3:/app/db.sqlite3
    ports:
      - '${WSGI_PORT:-8001}:8000'
    networks:
      - chatgpt_ui_network
    restart: always
  backend-web-server:
    platform: linux/x86_64
    image: wongsaang/chatgpt-ui-web-server:latest
    environment:
      - BACKEND_URL=http://backend-wsgi-server:8000
    ports:
      - '${SERVER_PORT:-9001}:80'
    depends_on:
      - backend-wsgi-server
    networks:
      - chatgpt_ui_network
    restart: always

networks:
  chatgpt_ui_network:
    driver: bridge


image

$ wget https://api.openai.com
--2024-01-10 21:41:43--  https://api.openai.com/
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving api.openai.com (api.openai.com)... 104.18.7.192, 104.18.6.192
Connecting to api.openai.com (api.openai.com)|104.18.7.192|:443... connected.
HTTP request sent, awaiting response... 421 Misdirected Request
2024-01-10 21:41:43 ERROR 421: Misdirected Request.

image

wsgi logs:

Operations to perform:
  Apply all migrations: account, admin, auth, chat, contenttypes, provider, sessions, sites, socialaccount, stats
Running migrations:
  No migrations to apply.
Setting up default settings...
CommandError: Error: That username is already taken.
[2024-01-10 19:54:55 +0000] [1] [INFO] Starting gunicorn 20.1.0
[2024-01-10 19:54:55 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2024-01-10 19:54:55 +0000] [1] [INFO] Using worker: sync
[2024-01-10 19:54:55 +0000] [35] [INFO] Booting worker with pid: 35
[2024-01-10 19:54:55 +0000] [36] [INFO] Booting worker with pid: 36
[2024-01-10 19:54:55 +0000] [37] [INFO] Booting worker with pid: 37
192.168.1.103 - - [10/Jan/2024:19:55:20 +0000] "GET / HTTP/1.1" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
192.168.1.103 - - [10/Jan/2024:19:55:21 +0000] "GET /favicon.ico HTTP/1.1" 404 179 "http://192.168.1.140:8001/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:55:41 +0000] "GET /api/account/user/ HTTP/1.0" 401 58 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:55:41 +0000] "GET /api/chat/settings/ HTTP/1.0" 200 187 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:55:42 +0000] "GET /api/chat/settings/ HTTP/1.0" 200 187 "http://192.168.1.140:81/account/signin?callback=%252F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:55:43 +0000] "GET /api/chat/settings/ HTTP/1.0" 200 187 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:55:58 +0000] "POST /api/account/registration/ HTTP/1.0" 201 624 "http://192.168.1.140:81/account/signup" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:56:09 +0000] "POST /api/account/login/ HTTP/1.0" 200 358 "http://192.168.1.140:81/account/signin" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:56:09 +0000] "GET /api/chat/conversations/ HTTP/1.0" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:56:09 +0000] "GET /api/chat/prompts/ HTTP/1.0" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:56:09 +0000] "GET /api/chat/embedding_document/ HTTP/1.0" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:56:33 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:56:48 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:19:57:37 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:00:08 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
192.168.1.103 - - [10/Jan/2024:20:24:40 +0000] "GET / HTTP/1.1" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:24:44 +0000] "GET / HTTP/1.0" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:24:44 +0000] "GET /favicon.ico HTTP/1.0" 404 179 "http://192.168.1.140:9001/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:24:49 +0000] "GET /admin HTTP/1.0" 301 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:24:49 +0000] "GET /admin/ HTTP/1.0" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:24:49 +0000] "GET /admin/login/?next=/admin/ HTTP/1.0" 200 4031 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:34:15 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:35:44 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:36:49 +0000] "GET /api/account/user/ HTTP/1.0" 200 84 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:36:49 +0000] "GET /api/chat/settings/ HTTP/1.0" 200 187 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/settings/ HTTP/1.0" 200 187 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/conversations/ HTTP/1.0" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/embedding_document/ HTTP/1.0" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/prompts/ HTTP/1.0" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:36:59 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:40:12 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:40:21 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"
172.19.0.3 - - [10/Jan/2024:20:40:32 +0000] "POST /api/conversation/ HTTP/1.0" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36"

backend-server

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
20-envsubst-on-templates.sh: Running envsubst on /etc/nginx/templates/default.conf.template to /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/01/10 19:54:52 [notice] 1#1: using the "epoll" event method
2024/01/10 19:54:52 [notice] 1#1: nginx/1.22.1
2024/01/10 19:54:52 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4) 
2024/01/10 19:54:52 [notice] 1#1: OS: Linux 6.2.0-26-generic
2024/01/10 19:54:52 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
2024/01/10 19:54:52 [notice] 1#1: start worker processes
2024/01/10 19:54:52 [notice] 1#1: start worker process 35
2024/01/10 19:54:52 [notice] 1#1: start worker process 36
2024/01/10 19:54:52 [notice] 1#1: start worker process 37
2024/01/10 19:54:52 [notice] 1#1: start worker process 38
2024/01/10 19:54:52 [notice] 1#1: start worker process 39
2024/01/10 19:54:52 [notice] 1#1: start worker process 40
2024/01/10 19:54:52 [notice] 1#1: start worker process 41
172.19.0.4 - - [10/Jan/2024:19:55:41 +0000] "GET /api/account/user/ HTTP/1.1" 401 58 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:55:41 +0000] "GET /api/chat/settings/ HTTP/1.1" 200 187 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:55:42 +0000] "GET /api/chat/settings/ HTTP/1.1" 200 187 "http://192.168.1.140:81/account/signin?callback=%252F" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:55:43 +0000] "GET /api/chat/settings/ HTTP/1.1" 200 187 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:55:58 +0000] "POST /api/account/registration/ HTTP/1.1" 201 624 "http://192.168.1.140:81/account/signup" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:56:09 +0000] "POST /api/account/login/ HTTP/1.1" 200 358 "http://192.168.1.140:81/account/signin" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:56:09 +0000] "GET /api/chat/prompts/ HTTP/1.1" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:56:09 +0000] "GET /api/chat/conversations/ HTTP/1.1" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:56:09 +0000] "GET /api/chat/embedding_document/ HTTP/1.1" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:56:33 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:56:48 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:19:57:37 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:00:08 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:44 +0000] "GET / HTTP/1.1" 404 179 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:44 +0000] "GET /favicon.ico HTTP/1.1" 404 179 "http://192.168.1.140:9001/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /admin HTTP/1.1" 301 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /admin/ HTTP/1.1" 302 0 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /admin/login/?next=/admin/ HTTP/1.1" 200 4031 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/js/vue.min.js?_=2023.03.01 HTTP/1.1" 200 93675 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/css/login.css?_=2.1 HTTP/1.1" 200 500 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/fontawesome-free-6.2.0-web/css/all.min.css HTTP/1.1" 200 101784 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/img/logo.png HTTP/1.1" 200 115997 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/elementui/theme-chalk/index.css HTTP/1.1" 200 238628 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/js/login.js?_=3.3 HTTP/1.1" 200 669 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/particles/particles.js HTTP/1.1" 200 51264 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/particles/app.js HTTP/1.1" 200 3728 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
��
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/img/bg.svg HTTP/1.1" 200 9547 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/elementui/index.js?_=2023.03.01 HTTP/1.1" 200 586253 "http://192.168.1.140:9001/admin/login/?next=/admin/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:49 +0000] "GET /static/admin/simpleui-x/fontawesome-free-6.2.0-web/webfonts/fa-solid-900.woff2 HTTP/1.1" 200 150472 "http://192.168.1.140:9001/static/admin/simpleui-x/fontawesome-free-6.2.0-web/css/all.min.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
192.168.1.103 - - [10/Jan/2024:20:24:50 +0000] "GET /static/admin/simpleui-x/elementui/theme-chalk/fonts/element-icons.woff HTTP/1.1" 200 28200 "http://192.168.1.140:9001/static/admin/simpleui-x/elementui/theme-chalk/index.css" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:34:15 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:35:44 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:36:49 +0000] "GET /api/account/user/ HTTP/1.1" 200 84 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:36:49 +0000] "GET /api/chat/settings/ HTTP/1.1" 200 187 "-" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/settings/ HTTP/1.1" 200 187 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/embedding_document/ HTTP/1.1" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/conversations/ HTTP/1.1" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:36:50 +0000] "GET /api/chat/prompts/ HTTP/1.1" 200 2 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:36:59 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:40:12 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:40:21 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"
172.19.0.4 - - [10/Jan/2024:20:40:32 +0000] "POST /api/conversation/ HTTP/1.1" 400 41 "http://192.168.1.140:81/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36" "-"