mbin icon indicating copy to clipboard operation
mbin copied to clipboard

Issues using s3 with docker setup

Open jwr1 opened this issue 1 year ago • 3 comments

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.

jwr1 avatar Jun 04 '24 14:06 jwr1

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.

github-actions[bot] avatar Jul 27 '24 02:07 github-actions[bot]

This is definitely still an issue.

jwr1 avatar Jul 27 '24 15:07 jwr1

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

ghost avatar Aug 07 '24 00:08 ghost

The problem is this is not commented in the docker procedure. I stumble on this, porting to k8s.

NicolasTobias avatar Mar 21 '25 16:03 NicolasTobias

fixed configuring a configmap for that file, allowing to be configured from the manifest.

NicolasTobias avatar Mar 26 '25 16:03 NicolasTobias