mirror of
https://github.com/webstudio-is/webstudio.git
synced 2025-03-15 09:45:09 +00:00
## Description 1. What is this PR about (link the issue and add a short description) ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
Admin only
Based on this article https://dev.to/istarkov/fast-and-easy-way-to-setup-web-developer-certificates-450e
sudo rm -rf /tmp/certbot/
sudo rm -rf /tmp/letsencrypt/
mkdir -p /tmp/certbot/
mkdir -p /tmp/letsencrypt/
infisical login
infisical init
CLOUDFLARE_API_KEY=$(infisical secrets get WSTD_DEV-CLOUDFLARE_ZONE_TOKEN --path='/CLI' --env=staging --plain)
cat > /tmp/certbot/cloudflare.ini <<-DOCKERFILE
dns_cloudflare_api_token = ${CLOUDFLARE_API_KEY}
DOCKERFILE
docker run -it --rm --name certbot \
-v "/tmp/letsencrypt/data:/etc/letsencrypt" \
-v "/tmp/certbot:/local/certbot" \
certbot/dns-cloudflare certonly \
--dns-cloudflare \
--dns-cloudflare-credentials /local/certbot/cloudflare.ini \
--agree-tos \
--noninteractive \
-m istarkov@gmail.com \
-d wstd.dev \
-d '*.wstd.dev'
sudo chown -R $USER:$(id -g) /tmp/letsencrypt
cp /tmp/letsencrypt/data/live/wstd.dev/fullchain.pem ./https/fullchain.pem
cp /tmp/letsencrypt/data/live/wstd.dev/privkey.pem ./https/privkey.pem