Personal blog website with Markdown using a plain HTML/CSS/JavaScript frontend and Axum (Rust) backend
Clone this repository including submodules to make syntax highlighting work.
git clone --recurse-submodules --shallow-submodules https://github.com/JorianWoltjer/jorianwoltjer.com
A .env
file should be created with two strong randomly generated passwords for the database.
The following command will build and start the containers:
docker-compose up -d --build
# View logs temporarely
docker-compose logs --tail=10 --follow
While it is running, use the manager
binary to perform some administrative actions.
$ docker compose exec -it app manager
Perform simple management tasks on the website
Usage: manager <COMMAND>
Commands:
theme Syntax highlighing themes
render Update generated HTML for all posts
password Set administrator password (will be prompted)
help Print this message or the help of the given subcommand(s)
The most imporant to start with is password
to set a new strong password for the /login
page (default is "secret").
Any changes to the render code should be followed by running the render
management command to refresh all HTML in the database.
Run database server for testing
docker run --name postgres-dev -p 5432:5432 -e POSTGRES_PASSWORD=postgres -d postgres
Run and create tables on local database
sqlx database drop && sqlx database create && sqlx migrate run
Create database dump:
docker exec -it jw-db pg_dump -U postgres > app.dump
Restore database dump:
docker exec -i jw-db psql -U postgres < app.dump