Uploads on multiple workers, one redis and mariadb

Hi there,

We have a distributed frontend for CTFd and I’m wondering if there’s a way with the container I’m using to push uploads to a specific s3 bucket or similar.

Has anyone worked with CTFd in this way before?

Thanks,
Alex

CTFd has built in S3 support. You should just be able to configure it in config.ini in the relevant S3 settings.

See https://docs.ctfd.io/docs/deployment/configuration/#aws-access-key-id

Oh so that will default the uploads to an S3 bucket?

Do I need AWS_S3_ENDPOINT_URL or is that just in special circumstances?

See https://github.com/CTFd/CTFd/issues/1389. It’s mostly for special circumstances and you normally don’t need to provide it.

I’ve configured those 3 variables for the container and my s3 bucket still isn’t showing data on upload. Do I need to set the uploads var, too?

here’s what I have set up. I should be uploading to S3 now and it’s not working. I even turned on public access to ensure it wasn’t an ACL issue. I’m not getting any errors, it uploads successfully because it seems to still be trying to upload to filesystem.

I believe the bucket variable should just be the bucket name, not the full ARN.

I’ve tried both of those FWIW… Not sure. We just switched over to managing the bucket ourselves.