add README

This commit is contained in:
ari melody 2024-09-04 17:18:56 +01:00
parent dc619821bd
commit bc1b6c5872
Signed by: ari
GPG key ID: CF99829C92678188
2 changed files with 29 additions and 0 deletions

1
.gitignore vendored
View file

@ -1,5 +1,6 @@
**/.DS_Store
.idea/
db/
tmp/
test/
uploads/*

28
README.md Normal file
View file

@ -0,0 +1,28 @@
# arimelody.me
home to your local SPACEGIRL! 💫
---
built up from the initial [static](https://git.arimelody.me/ari/arimelody.me-static) branch, this powerful, server-side rendered version comes complete with live updates, powered by a new database and super handy admin panel!
the admin panel currently facilitates live updating of my music discography, though i plan to expand it towards art portfolio and blog posts in the future. if all goes well, i'd like to later separate these components into their own library for others to use in their own sites. exciting stuff!
## build
easy! just `git clone` this repo and `go build` from the root. `arimelody-web(.exe)` should be generated.
## running
the webserver depends on some environment variables (don't worry about forgetting some; it'll be sure to bug you about them):
- `HTTP_DOMAIN`: the domain the webserver will use for generating oauth redirect URIs (default `https://arimelody.me`)
- `DISCORD_ADMIN`[^1]: the user ID of your discord account (discord auth is intended to be temporary, and will be replaced with its own auth system later)
- `DISCORD_CLIENT`[^1]: the client ID of your discord OAuth application.
- `DISCORD_SECRET`[^1]: the client secret of your discord OAuth application.
[^1]: not required, but the admin panel will be **disabled** if these are not provided.
the webserver requires a database to run. in this case, postgres.
the [docker compose script](docker-compose.yml) contains the basic requirements to get you up and running, though it does not currently initialise the schema on first run. you'll need to `docker compose exec -it arimelody.me-db-1` to access the database container while it's running, run `psql -U arimelody` to get a postgres shell, and copy/paste the contents of [schema.sql](schema.sql) to initialise the database. i'll build an automated initialisation script later ;p