~dusnm/dusanmitrovic.xyz

Source files for my personal website.
Adding table and blockquote styles to CSS.
Adding footer badges.
Adding The Internet Archive bot to the list of disallowed user agents.

refs

master
browse  log 

clone

read-only
https://git.sr.ht/~dusnm/dusanmitrovic.xyz
read/write
git@git.sr.ht:~dusnm/dusanmitrovic.xyz

You can also use your local clone with git send-email.

#dusanmitrovic.xyz

Source code for my website.

#Table of contents

#Configure hosts

Add these lines to the end of your /etc/hosts file.

127.0.0.1 website.test
127.0.0.1 website-smtp.test
127.0.0.1 website-db.test

These will be used to access the website and its services in development.

#Run docker development environment

This will bootstrap the development environment and all its dependencies.

docker compose -f ./docker/development/docker-compose.yaml up -d

#Run migrations

This is necessary to update the database schema.

docker exec website-node knex migrate:latest

#Run seeds

If you want to seed the databse with some fake data run this command.

docker exec website-node knex seed:run

#Services

The docker environment will start the following services.

#Production setup

Docker is meant for development only. To host the webiste in production you must manage the environment yourself.

Requirements:

  • nginx
  • redis
  • mariadb >= 10.7
  • node >= 16
  • npm (or any other node package manager of your choice)
  • pm2 (optional)

To minify CSS for production (required) run:

npm run minify-css

If you're using PM2 as your node service manager an example confifguration is provided. Edit it to suit your needs.

It also lists all the environment variables that need to be configured.

#Licensing

All source code written for this website is licensed under the terms of GNU AGPLv3.

All content on this website is licensed under the terms of CC-BY-SA.