Skip to content

TorBorve/Personal-website

Repository files navigation

My Personal Website

You can view my website here.

CI Latest Release

About

This repository contains the source code for my website. The website is written in Rust using the frontend framework Yew. Trunk is used to compile the the code to WebAssembly. Github actions is used to test and deploy the code. Pushing to main automatically triggers a build which will be deployed to my server hosting the website.

🔧 Development

  • Dependencies

    • Rust
    • Trunk (cargo install trunk)
    • wasm32-unknown-unknown (rustup target add wasm32-unknown-unknown)
  • Build

    trunk serve

Hosting

Nginx docker container is used to host the website. The docker compose file and ngnix.conf needs to be copied to the server hosting the website. Then start the docker container using

docker compose up -d

Then we need to copy the files over to the server. First compile to wasm using:

trunk build --release

Copy contents of dist/ directory into torborve_web in folder used to start the docker container.

SSL Certificates

I use Let's Encrypt for my SSL certificates:

sudo certbot certonly --standalone -d torborve.no -d xn--brs-ula.no

This will create certificates. They need to be updated every 90 days. I am not sure if this is done automatically.

The docker container needs permission to read the certificates. This can be done by running:

sudo chown -R www-data:www-data /etc/letsencrypt/live/ /etc/letsencrypt/archive/
sudo chmod -R 755 /etc/letsencrypt/

Resources

  • use plotters in yew: LINK
  • github actions with rust: LINK

About

Source code for my personal website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published