Skip to content

PyLabRobot/demo

Repository files navigation

demo

The simulator server.

Common tasks

Starting the server

  • Dev:
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d

Server will run at http://localhost.

  • Prod:
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

After a change to web:

docker compose build web
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d

Generating a new activation code

./create-act.sh

Logging into the database

sudo docker exec -ti demo-db-1 psql -U postgres -d db

Rebuilding a change in the simulator

./build.sh

See who logged in in the past x hours

sudo docker exec -it demo-db-1 psql -U postgres -d db -c "select events.id, events.created_on, events.code, users.id, users.email from events inner join users on events.uid = users.id where events.created_on > (NOW() - INTERVAL '15 hours' ) order by events.created_on;"

Issues / TODO