Skip to content

itsmeowForks/Modtoberfest-Site

 
 

Repository files navigation

Modtoberfest site

This is the platform used for the Modtoberfest event(s)

Development

Dependencies

  • NodeJS
  • PostgreSQL
  • NPM
  • A Github account

Installing for development

  1. Create Github OAuth app

    * Use http://localhost:3000 as the callback url

    Do not close the page before the next step! You will need your client secret and token.

    Follow the steps here: https://docs.github.com/en/developers/apps/creating-an-oauth-app

  2. Create .env file

    • Rename the file .env.example to .env
    • Fill in your github id and secret you got from the previous step
    • Fill in your database information. Usually can stay untouched.
  3. Setup database

    • Create database "modtoberfest"
    • Install knex npm install knex -g
    • Run migrations knex migrate:latest
  4. Install dependencies

    npm i
  5. Run the app

    npm run dev

That's it! Visit http://localhost:3000 to get started!

Deployment

  1. Log into Docker Hub or your docker registery of choice

    See the login reference page

  2. Build and Push the Docker image

        docker build . -t <username>/<name>
        docker push <username>/<name>

    Or edit publish.sh (or publish.bat on Windows) to fit your username and run the script.

  3. Run the container

    There is multiple ways to run the container, you can simply do

        docker run <username>/<name> -p 3000

    Or you can use more advanced options such as docker-compose, see the docker-compose.yml file for reference.

  4. Setup the database

    Follow the steps for the development process except for the migration part.

    1. Copy your .env file and rename it .env.prod

    2. Fill in the information to your database

    3. Run migrate-prod.sh (or .bat on windows)*

      Be extremely careful when running migrations in production as it can lead to data loss

      * If your database is running on a remote server, you can use a ssh tunnel more info

About

The site source for Modtoberfest.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 97.1%
  • CSS 1.6%
  • Other 1.3%