Skip to content

LA1TV/Website-Backend

Repository files navigation

Website-Backend

The re-written backend for the LA1TV website

For tracking our progress.

Database Info

Creating it

Make a mysql database. Then copy .env.template to .env and configure. Then run npx sequelize db:create to set it all up.

Updating it

npx sequelize db:migrate

Creating an API key

Run npm run db -- create apikey --name <name>. It'll generate a key for you.

Using Docker

On an update

  1. Kill any website-backend containers in sudo docker ps using sudo docker kill <id> (the id only needs to be the first 5 characters).
  2. Then ./dockerBuild.sh.
  3. Run a DB migrate if you need to: ./dockerRun.sh npx sequelize db:migrate
  4. Then ./dockerStart.sh

Running commands within the container

Just put ./dockerRun.sh in front of the command.

To run the server

  1. Kill any website-backend containers in sudo docker ps using sudo docker kill <id> (the id only needs to be the first 5 characters).
  2. ./dockerStart.sh