OpenSignLabs / OpenSign

🔥 The free & Open Source DocuSign alternative
https://www.opensignlabs.com
GNU Affero General Public License v3.0
3.32k stars 261 forks source link

[Bug]: #1368

Open vitorkaviski-ql opened 3 weeks ago

vitorkaviski-ql commented 3 weeks ago

Issue Description

When attempting to upload a file in the OpenSign application using MinIO, an error occurs indicating that the host is inaccessible and the port is undefined. The application is incorrectly trying to access the host using the standard subdomain format opensign.[domain] instead of the correct path-based endpoint [domain]/opensign. This misconfiguration prevents documents from being properly stored in the designated MinIO bucket.

Expected Behavior

I expected the file to be successfully uploaded to the specified MinIO bucket named "opensign" through the correct endpoint [domain]/opensign.

Current Behavior

Upon attempting to upload a file, the application returns the following error in the browser console: "Form.js:449 Error uploading file: c: Inaccessible host: opensign.minioapi.[domain]' at port undefined'. This service may not be available in the `us-east-1' region." This error indicates that the application is attempting to access an incorrect host address and an undefined port, leading to the failure of the upload process.

Steps to reproduce

Configure Environment Variables: Update the .env.prod file with the following settings:

Set PUBLIC_URL to https://opensign.[domain]. Define APP_ID as opensign. Set MASTER_KEY to a secure key. Configure MONGODB_URI as mongodb://mongo-container:27017/OpenSignDB. Set PARSE_MOUNT to /app. Define SERVER_URL as https://opensign.[domain]/app. Configure MinIO settings: DO_SPACE to opensign. DO_ENDPOINT to minioapi.[domain]. DO_BASEURL to https://minioapi.[domain]. DO_ACCESS_KEY_ID to [Your_S3_Access_ID]. DO_SECRET_ACCESS_KEY to [Your_S3_Secret_Key]. DO_REGION to us-east-1. Set USE_LOCAL to false.

Update docker-compose.yml: Ensure that the docker-compose.yml file correctly references the environment variables and ports:

Restart Docker Containers: Execute the following commands to apply the changes:

Bring down the containers with docker-compose down -v. Recreate and start the containers with docker-compose up -d --force-recreate. Test Connectivity with MinIO: Run a Python script to ensure that the application can successfully connect to MinIO and list the existing buckets.

Attempt File Upload Again: Try uploading a file through the OpenSign application to see if the issue persists.

Screenshots of the issue(optional)

Captura de tela 2024-10-21 085227

Operating System [e.g. MacOS Sonoma 14.1, Windows 11]

Ubuntu Server

What browsers are you seeing the problem on?

Chrome, Firefox, Safari, Microsoft Edge

What version of OpenSign™ are you seeing this issue on? [e.g. 1.0.6]

v2.5.0

What environment are you seeing the problem on?

Hosted (app.yourdomain.com)

Please check the boxes that apply to this issue report.

Code of Conduct

andrew-opensignlabs commented 5 days ago

Can you configure MinIO to use subdomains instead? AFAIK it already allows you to do that.image

https://min.io/docs/minio/linux/reference/minio-server/settings/core.html