MbinOrg / mbin

Mbin: a federated content aggregator, voting, discussion and microblogging platform (By the community, for the community)
https://joinmbin.org
GNU Affero General Public License v3.0
207 stars 18 forks source link

Issues using s3 with docker setup #809

Open jwr1 opened 3 months ago

jwr1 commented 3 months ago

As explained on the optional-features/s3_storage page, you need to edit the config/packages/oneup_flysystem.yaml file to use the s3 adapter. After doing so, the docker image build command starts to fail on this step: [builder-composer 7/7] RUN composer run-script --no-dev post-install-cmd && chmod +x bin/console && sync. It has errors like The s3 service does not have version and Missing required client configuration options: region: (string). I got around this by filling out the s3 environment variables in the .env.example_docker file (since that's the file that gets copied over in Dockerfile, but obviously, we shouldn't have to do that.

Basically, it's checking that the s3 variables are filled out when it shouldn't; it should check them at runtime instead of build time.

github-actions[bot] commented 1 month ago

This issue is stale because it has been open 50 days with no activity. Remove stale label or comment or this will be closed in 6 days.

jwr1 commented 1 month ago

This is definitely still an issue.

ghost commented 1 month ago

hmmm, i tried to replicate this and i cant seem to get the docker build to fail just by changing config/packages/oneup_flysystem.yaml. does your config/packages/oneup_flysystem.yaml look like this? and your build command look like this? docker build --no-cache -t mbin -f Dockerfile ..


# Read the documentation: https://github.com/1up-lab/OneupFlysystemBundle
oneup_flysystem:
  adapters:
    default_adapter:
      local:
        location: "%kernel.project_dir%/public/%uploads_dir_name%"

    kbin.s3_adapter:
      awss3v3:
        client: kbin.s3_client
        bucket: "%amazon.s3.bucket%"
        options:
          ACL: public-read
    ## If using an s3 bucket with owner-full-control and no ACL, the following may work:
    ##    options:
    ##      ACL: ''

  filesystems:
    public_uploads_filesystem:
      #adapter: default_adapter
      adapter: kbin.s3_adapter
      alias: League\Flysystem\Filesystem