Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce filestorage app, support for multiple file backends and store file metadata in the database #1104

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

suricactus
Copy link
Collaborator

This PR introduces a new enhanced way to store filedata. Before just dumped everything to the Object Storage. This made everything clumsy, slow and not flexible.

The plan is to quickly migrate all projects to the new storage and delete the legacy approach.

I have closed #1065, which was the same PR.

@duke-nyuki
Copy link
Collaborator

Copy link
Contributor

@gounux gounux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First review focused on docker compose and environment / migrations considerations, trying to set it up on my local.
Did not have a look at the python code that much yet.

docker-app/qfieldcloud/filestorage/models.py Show resolved Hide resolved
.env.example Show resolved Hide resolved
Comment on lines -41 to -51
STORAGE_ACCESS_KEY_ID=minioadmin
STORAGE_SECRET_ACCESS_KEY=minioadmin
STORAGE_BUCKET_NAME=qfieldcloud-local
STORAGE_REGION_NAME=

# URL to the storage endpoint either minio, or external (e.g. S3).
# The URL must be reachable both from within docker and from the host, the default value is the `bridge` docker URL.
# Read more on https://docs.docker.com/network/network-tutorial-standalone/ .
# NOTE: to use minio on windows/mac, change the value to "http://host.docker.internal:8009"
# DEFAULT: http://172.17.0.1:8009
STORAGE_ENDPOINT_URL=http://172.17.0.1:8009
Copy link
Contributor

@gounux gounux Jan 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These env variables seem to be mandatory in order to set up minio container on local / standalone instances :

environment:
      MINIO_ROOT_USER: ${STORAGE_ACCESS_KEY_ID}
      MINIO_ROOT_PASSWORD: ${STORAGE_SECRET_ACCESS_KEY}
      MINIO_BROWSER_REDIRECT_URL: http://${QFIELDCLOUD_HOST}:${MINIO_BROWSER_PORT}

Should the environment key of the minio service be changed in the docker-compose.override.standalone.yml to make use of this new STORAGE variable ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I need to address these.

@suricactus
Copy link
Collaborator Author

@gounux apologies for the force push, I first rebased and then realized I had to force push.

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.

3 participants