Skip to content

OneForFreedom/construct

 
 

Repository files navigation

Construct

A Hack Club YSWS event

Built with SvelteKit, deployed with Docker (auto-builds container image and publishes to GitHub packages!)

Stack:

  • SvelteKit
  • Drizzle ORM
  • PostgreSQL
  • Cloudflare R2

Developing

The recommended and easiest way to develop is to use a devcontainer to automatically set up a dev environment.

Copy .env.example to .env and update the stuff inside, then run this to initialise the database:

npm run db:migrate

Start a development server:

npm run dev

You can also run this to get a GUI for the database:

npm run db:studio

Deploying

Create a .env file containing all the required credentials, look at .env.example for an example.

Use the following docker-compose.yaml file to deploy:

services:
  db:
    restart: always
    image: postgres:latest
    environment:
      - POSTGRES_HOST_AUTH_METHOD=trust # fine for testing, ideally add a password before deployment
    volumes:
      - constructdb:/var/lib/postgresql
  construct:
    restart: always
    depends_on:
      - db
    ports:
      - 3004:3000
    env_file:
      - .env
    pull_policy: always
    image: ghcr.io/hackclub/construct:production
networks: {}
volumes:
  constructdb:

Use the staging image tag instead of production for the staging environment.

About

The site for Construct!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Svelte 52.3%
  • TypeScript 39.0%
  • CSS 6.0%
  • JavaScript 2.0%
  • Other 0.7%