Skip to content

PedroBinotto/website

Repository files navigation

muh website pedrobinotto.xyz

Build

Requirements

The sqlc, templ and air packages can be installed directly via Go (recommended):

go install github.com/sqlc-dev/sqlc/cmd/sqlc@latest
go install github.com/a-h/templ/cmd/templ@latest
go install github.com/air-verse/air@latest

The TailwinCSS CLI (MUST be 3.X.X) tool can be installed via the Node Package Manager (ewwww) or as a standalone binary:

# v3.4.16 Latest v3 release as of writing
curl -sLO https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.16/tailwindcss-linux-x64
chmod +x tailwindcss-linux-x64
mv tailwindcss-linux-x64 /otp/tailwindcss # assuming /opt is in your $PATH

Configuration

All configuration is done via .env; an example file can be found in .env.example

DB_HOST=website-db
DB_USER=postgres
DB_PASSWORD=postgres
DB_NAME=app_db
DB_PORT=5432

Execution

Run it natively:

# Builds the binary
make build
# Creates and migrates the database containers for the app
docker compose up -d migrate
# Runs app with `air` (live reload) for development
make start

Run it in a container:

docker compose up -d

Both will run on port 8080 by default.

TODO:

  • Automate sitemap.xml generation on build;
  • /blog/{X}:
    • setup blogs repo + CI actions;
    • fix DB indexing for files;

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published