Rumon
Rumon
Explore posts from servers
CDCloudflare Developers
Created by Rumon on 9/14/2024 in #general-help
Defining R2 Binding in wrangler.toml
Hi, I have an R2 bucket at EU named "foo". The corresponding S3 URL is like https://account_id.eu.r2.cloudflarestorage.com/foo. In my Workers project's wrangler.toml file, I've added it like:
[[r2_buckets]]
binding = "APP_BUCKET"
bucket_name = "foo"
[[r2_buckets]]
binding = "APP_BUCKET"
bucket_name = "foo"
And I've set up GitHub Actions to deploy my Workers. Below is the config:
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
But it doesn't succeed. I get the following error in the runner:
/usr/local/bin/npx wrangler deploy
⛅️ wrangler 3.13.2 (update available 3.78.2)
---------------------------------------------
Your worker has access to the following bindings:
- R2 Buckets:
- APP_BUCKET: foo
Total Upload: 1.72 KiB / gzip: 0.72 KiB

✘ [ERROR] A request to the Cloudflare API (/accounts/***/workers/scripts/foo) failed.

workers.api.error.bucket_not_found [code: 10085]

If you think this is a bug, please open an issue at: https://github.com/cloudflare/workers-sdk/issues/new/choose
/usr/local/bin/npx wrangler deploy
⛅️ wrangler 3.13.2 (update available 3.78.2)
---------------------------------------------
Your worker has access to the following bindings:
- R2 Buckets:
- APP_BUCKET: foo
Total Upload: 1.72 KiB / gzip: 0.72 KiB

✘ [ERROR] A request to the Cloudflare API (/accounts/***/workers/scripts/foo) failed.

workers.api.error.bucket_not_found [code: 10085]

If you think this is a bug, please open an issue at: https://github.com/cloudflare/workers-sdk/issues/new/choose
The API token being used has the following permissions:
This API token will affect the below accounts and zones, along with their respective permissions


<Account Name> - Cloudflare Pages:Edit, Workers R2 Storage:Edit, Workers Tail:Read, Workers KV Storage:Edit, Workers Scripts:Edit, Account Settings:Read
All zones - Workers Routes:Edit
All users - Memberships:Read, User Details:Read
This API token will affect the below accounts and zones, along with their respective permissions


<Account Name> - Cloudflare Pages:Edit, Workers R2 Storage:Edit, Workers Tail:Read, Workers KV Storage:Edit, Workers Scripts:Edit, Account Settings:Read
All zones - Workers Routes:Edit
All users - Memberships:Read, User Details:Read
Can anyone help me out on this?
foo is just a dummy name. I'm using the actual name which is shown in the website (and also in the S3 URL).
2 replies
RRailway
Created by Rumon on 7/31/2023 in #✋|help
History of usage by service
Where can I see how much resources a particular project consumed in any previous month?
Project ID: 029952cc-2550-44ce-8fed-b54882783e4b
Thanks in advance.
8 replies
RRailway
Created by Rumon on 10/1/2022 in #✋|help
Need Access To Apache Logs
I'm trying to make a template for Nextcloud, which is at https://github.com/msrumon/railwayapp-template-nextcloud. The deployment is successful, but I get 500 status when I try to reach it. It says that detailed information about the error can be found in the server logs, but I can't get access to it. Can anyone from the core team help me please? - Project ID: f58f914a-d00f-4ee2-9dd3-292599b66a19 (deleted) - URL: https://nextcloud-production-0234.up.railway.app/ (removed)
43 replies
RRailway
Created by Rumon on 9/28/2022 in #✋|help
'Dark Mode' isn't being picked up automatically
Although the website has auto switching to dark mode enabled (https://github.com/railwayapp/docs/blob/8155004bd4b298f529c9beec7bcc9ecd8e749576/src/styles/theme.tsx#L60-L67), it's not actually doing so.
15 replies
RRailway
Created by Rumon on 9/24/2022 in #✋|help
Deploying an image from Docker Hub
Is there a way to deploy a public image from any public registry (especially from Docker Hub)?
19 replies
RRailway
Created by Rumon on 9/17/2022 in #✋|help
Volume (VOLUME) is banned in Dockerfiles
I have a VOLUME imstruction here in the Dockerfile. When I tried to deploy it, it failed to do so. Why is it so important that I can't have volumes declared in Dockerfile? P.S.: How can we mount an external disk to my app service?
6 replies
RRailway
Created by Rumon on 9/14/2022 in #✋|help
Running database migrations before each deployment (and AFTER build steps)
On Heroku, we could declare a release command which would be run on each deployment. Is there anything similar available on Railway as well?
web: vendor/bin/heroku-php-apache2 public/
release: php artisan migrate --force
web: vendor/bin/heroku-php-apache2 public/
release: php artisan migrate --force
I ain't using Docker.
31 replies