development to main periodic update #102

Merged
mik-tf merged 51 commits from development into main 2024-06-14 16:52:01 +00:00
2 changed files with 40 additions and 40 deletions
Showing only changes of commit 608bce3200 - Show all commits

View File

@ -29,9 +29,9 @@ We show how to deploy a free and open-source ecommerce on the ThreeFold Grid. We
## Prerequisites ## Prerequisites
- [A TFChain account](dashboard:wallet_connector.md) - [A TFChain account](dashboard@@wallet_connector)
- TFT in your TFChain account - TFT in your TFChain account
- [Buy TFT](threefold_token/buy_sell_tft:buy_sell_tft.md) - [Buy TFT](threefold_token@@buy_sell_tft)
- [Send TFT to TFChain](threefold_token@@tfchain_stellar_bridge) - [Send TFT to TFChain](threefold_token@@tfchain_stellar_bridge)
## Deploy a Full VM ## Deploy a Full VM

View File

@ -23,10 +23,10 @@ We show how to deploy a free and open-source ecommerce on the ThreeFold Grid. We
## Prerequisites ## Prerequisites
- [A TFChain account](dashboard:wallet_connector.md) - [A TFChain account](dashboard@@wallet_connector)
- TFT in your TFChain account - TFT in your TFChain account
- [Buy TFT](threefold_token:buy_sell_tft.md) - [Buy TFT](threefold_token@@buy_sell_tft)
- [Send TFT to TFChain](threefold_token:tfchain_stellar_bridge) - [Send TFT to TFChain](threefold_token@@tfchain_stellar_bridge)
## Deploy Wordpress ## Deploy Wordpress
@ -50,26 +50,26 @@ We start by deploying Wordpress on the ThreeFold Dashboard.
* TTL: Automatic * TTL: Automatic
* It might take up to 30 minutes to set the DNS properly. * It might take up to 30 minutes to set the DNS properly.
* To check if the A record has been registered, you can use a common DNS checker: * To check if the A record has been registered, you can use a common DNS checker:
* ``` ```
https://dnschecker.org/#A/example.com https://dnschecker.org/#A/example.com
``` ```
## HTTPS with Caddy ## HTTPS with Caddy
We set HTTPS with Caddy. We set HTTPS with Caddy.
- Install Caddy - Install Caddy
``` ```
apt install -y debian-keyring debian-archive-keyring apt-transport-https curl apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' > /etc/apt/sources.list.d/caddy-stable.list curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' > /etc/apt/sources.list.d/caddy-stable.list
apt update apt update
apt install caddy apt install caddy
``` ```
- Set a reverse proxy on port 80 with your own domain - Set a reverse proxy on port 80 with your own domain
``` ```
caddy reverse-proxy -r --from example.com --to :80 caddy reverse-proxy -r --from example.com --to :80
``` ```
You should see in the logs that it successfully obtains an SSL certificate, and after that you can try navigating to your site's domain again to verify it's working. Using a private window or adding `https://` specifically might be necessary until your browser drops its cache. You should see in the logs that it successfully obtains an SSL certificate, and after that you can try navigating to your site's domain again to verify it's working. Using a private window or adding `https://` specifically might be necessary until your browser drops its cache.
@ -80,44 +80,44 @@ When you're satisfied that everything looks good, hit `ctl-c` to exit Caddy and
By default, ufw is set on Wordpress application from the Dashboard. To use Caddy and set HTTPS, we want to allow port 443. By default, ufw is set on Wordpress application from the Dashboard. To use Caddy and set HTTPS, we want to allow port 443.
* Add the permissions * Add the permissions
* ``` ```
ufw allow 443 ufw allow 443
``` ```
### Manage with zinit ### Manage with zinit
We manage Caddy with zinit. We manage Caddy with zinit.
- Open the file for editing - Open the file for editing
```bash ```bash
nano /etc/zinit/caddy.yaml nano /etc/zinit/caddy.yaml
``` ```
- Insert the following line with your own domain and save the file - Insert the following line with your own domain and save the file
``` ```
exec: caddy reverse-proxy -r --from example.com --to :80 exec: caddy reverse-proxy -r --from example.com --to :80
``` ```
- Add the new Caddy file to zinit - Add the new Caddy file to zinit
```bash ```bash
zinit monitor caddy zinit monitor caddy
``` ```
Zinit will start up Caddy immediately, restart it if it ever crashes, and start it up automatically after any reboots. Assuming you tested the Caddy invocation above and used the same form here, that should be all there is to it. Zinit will start up Caddy immediately, restart it if it ever crashes, and start it up automatically after any reboots. Assuming you tested the Caddy invocation above and used the same form here, that should be all there is to it.
Here are some other Zinit commands that could be helpful to troubleshoot issues: Here are some other Zinit commands that could be helpful to troubleshoot issues:
- See status of all services (same as "zinit list") - See status of all services (same as "zinit list")
``` ```
zinit zinit
``` ```
- Get logs for a service - Get logs for a service
``` ```
zinit log caddy zinit log caddy
``` ```
- Restart a service (to test configuration changes, for example) - Restart a service (to test configuration changes, for example)
``` ```
zinit stop caddy zinit stop caddy
zinit start caddy zinit start caddy
``` ```
## Access Admin Panel ## Access Admin Panel