Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Add webpack_config; document CF_TOKEN export #4

Merged
merged 3 commits into from Apr 2, 2020

Conversation

limakzi
Copy link
Contributor

@limakzi limakzi commented Mar 28, 2020

This patch:

  • Configures webpack.config in Wrangle.
  • Documents CF_API_TOKEN export.

Signed-off-by: Kamil Zabielski <kamil.zabielski@sysdogs.com>
@dhaynespls
Copy link
Contributor

dhaynespls commented Mar 30, 2020

Hey!

Good catch with the wrangler config.

You don't necessarily need the CF_API_TOKEN environment variable as you should be using https://github.com/cloudflare/wrangler#-config with an scoped token.

That said, I forgot to document that! If you could add a link to that up in section 1 that would be great.

@limakzi
Copy link
Contributor Author

limakzi commented Mar 30, 2020

No worries. Thank you for your feedback.

  • I would say, keeping the token in environment variable is a more secure way of injecting a secret than keeping that in local file-system.
  • More-over, it is easier to apply for CI/CD, like we did at @sysdogs.

What do you think, @dhaynespls ?

@dhaynespls
Copy link
Contributor

That's fair, we support both for a reason.

I would phrase it in a way that's something along these lines:

You will need to obtain a scoped API token to publish the worker. You can do this at https://dash.cloudflare.com/profile/api-tokens, and choose the "Edit Cloudflare Workers" template. 

To deploy with the token, 

a) wrangler config
=> enter token 
=> make deploy
b) `CF_API_TOKEN=${token}` make deploy

@limakzi
Copy link
Contributor Author

limakzi commented Mar 31, 2020

@dhaynespls Approved the new version.
I will fix PR.

Kamil Zabielski added 2 commits April 1, 2020 01:37
Signed-off-by: Kamil Zabielski <kamil.zabielski@sysdogs.com>
Signed-off-by: Kamil Zabielski <kamil.zabielski@sysdogs.com>
@limakzi
Copy link
Contributor Author

limakzi commented Mar 31, 2020

Every markdown preprocessor is different, daymn!
It's sufficient, I hope. Review ready.

@dhaynespls dhaynespls merged commit ca2ec48 into cloudflare:master Apr 2, 2020
@dhaynespls
Copy link
Contributor

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants