Skip to content

Adds local HTTPS config for Minio#621

Open
allanlasser wants to merge 4 commits intomasterfrom
minio-https
Open

Adds local HTTPS config for Minio#621
allanlasser wants to merge 4 commits intomasterfrom
minio-https

Conversation

@allanlasser
Copy link
Copy Markdown
Member

While getting my local DocumentCloud stack working, I ran into an upload error with Minio related to calling an unsecured http URL from the https://www.api.documentcloud.org server. I updated my local app to use https:// as the minio address, and local uploads worked with our local SSL config.

This should only impact local development.

While getting my local DocumentCloud stack working, I ran into an upload error with Minio related to calling an unsecured `http` URL from the `https://www.api.documentcloud.org` server. I updated my local app to use `https://` as the minio address, and local uploads worked with our local SSL config.
@allanlasser allanlasser self-assigned this Mar 19, 2026
@allanlasser allanlasser temporarily deployed to squarelet-pi-minio-http-j1w4mt March 19, 2026 19:31 Inactive
@duckduckgrayduck
Copy link
Copy Markdown
Contributor

I got this working with some changes in local.yml and .envs/.local/.django in the DocumentCloud repo.

  • Added squarelet_default network with internal.minio.documentcloud.org alias to documentcloud_minio

  • Changed documentcloud_minio's default network alias from minio.documentcloud.org to internal.minio.documentcloud.org

In .envs/.local/.django:

This works 100% on the Django 4 version. It is broken in Django 5 and let me see why this might be

@duckduckgrayduck
Copy link
Copy Markdown
Contributor

I got this working in Django 5, but it requires adding a few more CORS headers in the nginx conf so uploads work for both private and public. It also required some fixes in the DocumentCloud local processing pipeline which I'll include in the django5_upgrade branch and merge into staging. I'll probably need to adapt the environment variable creation to fix this as well

@duckduckgrayduck
Copy link
Copy Markdown
Contributor

I got this working fully with the Django 5 upgrade branch. Required updating the Minio image to something more modern (2024) for SSL to work with the upgraded S3 packages. I added two things in this PR, which we will merge when the Django 5 upgrades are ready to merge. One is upping the client max body size, because nginx limits us to small documents otherwise, and the other is a preference thing to keep minio link the same as what it was before but means I don't have to change it on DocumentCloud's side

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants