revite icon indicating copy to clipboard operation
revite copied to clipboard

bug: File Uploading Caddyfile Settings may be not right

Open YoussefRefaat1976 opened this issue 7 months ago • 2 comments

What happened?

Only text works, let me show you here my files:

Cadddyfile `www.MyDOMAIN.com, MyDOMAIN.com { tls [email protected]

@api path /api* handle @api { uri strip_prefix /api reverse_proxy http://api:14702 }

@ws path /ws* handle @ws { uri strip_prefix /ws reverse_proxy http://events:14703 }

@autumn path /autumn* handle @autumn { uri strip_prefix /autumn reverse_proxy http://autumn:14704 { header_up Authorization {>Authorization} } } @january path /january* handle @january { uri strip_prefix /january reverse_proxy http://january:14705 }

handle { root * /var/www/revolt-frontend try_files {path} /index.html file_server } } `

Revolt.toml [hosts] app = "https://www.MYDOMAIN.com" api = "https://www.MYDOMAIN.com/api" events = "wss://www.MYDOMAIN.com/ws" autumn = "https://www.MYDOMAIN.com/autumn" january = "https://www.MYDOMAIN.com/january" also I'm thinking if may be a problem with the private_key, Public key! but...

my compose.yml `name: revolt

services:

MongoDB: Database database: image: docker.io/mongo restart: always volumes:

  • ./data/db:/data/db healthcheck: test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet interval: 10s timeout: 10s retries: 5 start_period: 10s

Redis: Event message broker & KV store redis: image: docker.io/eqalpha/keydb restart: always

RabbitMQ: Internal message broker rabbit: image: docker.io/rabbitmq:4 restart: always environment: RABBITMQ_DEFAULT_USER: rabbituser RABBITMQ_DEFAULT_PASS: rabbitpass volumes:

  • ./data/rabbit:/var/lib/rabbitmq healthcheck: test: rabbitmq-diagnostics -q ping interval: 10s timeout: 10s retries: 3 start_period: 20s

MinIO: S3-compatible storage server minio: image: docker.io/minio/minio command: server /data volumes:

  • ./data/minio:/data environment: MINIO_ROOT_USER: minioautumn MINIO_ROOT_PASSWORD: minioautumn MINIO_DOMAIN: minio networks: default: aliases:
  • revolt-uploads.minio

legacy support:

  • attachments.minio
  • avatars.minio
  • backgrounds.minio
  • icons.minio
  • banners.minio
  • emojis.minio restart: always

Caddy: Web server caddy: image: docker.io/caddy restart: always env_file: .env.web ports:

  • "80:80"
  • "443:443" volumes:
  • ./Caddyfile:/etc/caddy/Caddyfile
  • ./data/caddy-data:/data
  • ./data/caddy-config:/config

<<< ADD THIS LINE >>>

  • /var/www/revolt-frontend:/var/www/revolt-frontend:ro

API server api: image: ghcr.io/revoltchat/server:20250210-1 depends_on: database: condition: service_healthy redis: condition: service_started rabbit: condition: service_healthy volumes:

  • type: bind source: ./Revolt.toml target: /Revolt.toml restart: always

Events service events: image: ghcr.io/revoltchat/bonfire:20250210-1 depends_on: database: condition: service_healthy redis: condition: service_started volumes:

  • type: bind source: ./Revolt.toml target: /Revolt.toml restart: always

Web App web: image: ghcr.io/revoltchat/client:master restart: always env_file: .env.web

File server autumn: image: ghcr.io/revoltchat/autumn:20250210-1 depends_on: database: condition: service_healthy createbuckets: condition: service_started volumes:

  • type: bind source: ./Revolt.toml target: /Revolt.toml restart: always

Metadata and image proxy january: image: ghcr.io/revoltchat/january:20250210-1 volumes:

  • type: bind source: ./Revolt.toml target: /Revolt.toml restart: always

Regular task daemon crond: image: ghcr.io/revoltchat/crond:20250210-1-debug depends_on: database: condition: service_healthy minio: condition: service_started volumes:

  • type: bind source: ./Revolt.toml target: /Revolt.toml restart: always

Push notification daemon pushd: image: ghcr.io/revoltchat/pushd:20250210-1 depends_on: database: condition: service_healthy redis: condition: service_started rabbit: condition: service_healthy volumes:

  • type: bind source: ./Revolt.toml target: /Revolt.toml restart: always

Create buckets for minio. createbuckets: image: docker.io/minio/mc depends_on:

  • minio entrypoint: > /bin/sh -c " while ! /usr/bin/mc ready minio; do /usr/bin/mc config host add minio http://minio:9000/ minioautumn minioautumn; echo 'Waiting minio...' && sleep 1; done; /usr/bin/mc mb minio/revolt-uploads; exit 0; " `

Branch

Production (app.revolt.chat)

Commit hash

I have an issue while uploading a file, a photo

What browsers are you seeing the problem on?

Chrome, Other (please specify in the "What happened" form)

Relevant log output

GET
https://www.mydomain.com/
[HTTP/2 304 236ms]

GET
wss://www.MYDOMAIN.com/ws

GET
https://www.mydomain.com/assets/main.1468d6bd.js
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/vendor.53ae3162.js
[HTTP/2 200 0ms]

XHRGET
https://www.mydomain.com/api/release
[HTTP/2 404 318ms]

GET
https://www.mydomain.com/assets/call_join.584596d3.mp3
[HTTP/2 206 0ms]

GET
https://www.mydomain.com/assets/message.1da7350f.mp3
[HTTP/2 206 0ms]

GET
https://www.mydomain.com/assets/call_leave.73de5878.mp3
[HTTP/2 206 0ms]

Uncaught (in promise) SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data

GET
wss://www.MYDOMAIN.com/ws
[HTTP/1.1 101 Switching Protocols 1093ms]

GET
https://www.mydomain.com/assets/apple-touch.8a2f0789.png
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/logo_round.png
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/RevoltApp.d4dd4107.js
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/Titlebar.84573465.js
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/placeholder.a8e8f04f.svg
[HTTP/1.1 200 OK 0ms]

GET
https://www.mydomain.com/assets/wide.svg
[HTTP/1.1 200 OK 0ms]

GET
https://www.mydomain.com/api/users/01JV7SD0C15NZ3YCYEE46JYNJB/default_avatar
[HTTP/1.1 200 OK 0ms]

GET
https://www.mydomain.com/assets/open-sans-latin-500-normal.c64e196f.woff2
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/Renderer.4d4cd083.js
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/Renderer.1faefc04.css
[HTTP/2 200 0ms]

GET
https://www.mydomain.com/assets/open-sans-latin-400-italic.f27408b0.woff2
[HTTP/2 200 0ms]

XHRPOST
https://www.mydomain.com/autumn/attachments
[HTTP/2 401 291ms]

Desktop

  • [ ] Yes, this bug is specific to Revolt Desktop and is not an issue with Revolt Desktop itself.

PWA

  • [ ] Yes, this bug is specific to the PWA.

YoussefRefaat1976 avatar Jun 01 '25 10:06 YoussefRefaat1976