mbin
mbin copied to clipboard
Issues using s3 with docker setup
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.
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.
This is definitely still an issue.
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
The problem is this is not commented in the docker procedure. I stumble on this, porting to k8s.
fixed configuring a configmap for that file, allowing to be configured from the manifest.