Site and forum for a student organization centered around electronic music culture. This is a T3 Stack project bootstrapped with create-t3-app
.
The forum login is designed to be exclusive to members of certain Telegram groups. A Telegram user's membership status in the groups is checked with HYTKYbot.
- Docker Compose
- Make
git clone <this repo>
cd hytky
cp .env.example .env
and put your secret values in the.env
file.cp .hytkybot.env.example .hytkybot.env
and put your secret values in the.hytkybot.env
file.make dev
for hot reloading ormake prod
for a production-like environment.- Production environments should be seeded manually with
make seed
- Production environments should be seeded manually with
In a development environment, use the make migrate
command to generate and apply migrations.
Commit the following to source control:
- The entire migration history folder
- The schema.prisma file
The username of the Telegram bot that is used for the Telegram login button on the login page is stored as a variable on this GitHub repo. This is because we want to serve the login page with SSG from the container. To change the value to point to your own HYTKYbot:
- Fork this repo.
- Add the NEXT_PUBLIC_TG_BOT_NAME variable containing your bot's username to your forked repository.
- Edit docker/docker-compose.prod.from-registry.yml to point to your GHCR.
You should then be able to fetch the latest working image from your GHCR and simulate a deployment locally with make regprod
- Ansible & access to a x86_64
apt
based Linux production server
Replace 123.123.123.123 with your server's IP. Makefile asssumes you authenticate with ~/.ssh/id_rsa
.
make testconnect IP=123.123.123.123
should succeedmake prepareprod IP=123.123.123.123
make startprod IP=123.123.123.123
To push a new image, git tag
a commit on the main branch with a semantic version number (for example v1.0.0
).
Latest image should get picked up by Watchtower.
- Allow image submissions to posts and store them in minio (S3).
- use Watchtower to deploy production Docker image.
- English language option for all pages.
- Seed db from JSON if
prisma/eventArchive.json
orprisma/forumArchive.json
exist. - Remotely back up a deployment's database to
prisma/forumBackup.json
with a command. - Use src/server/utis/validators
- Use toasts