This project is created for Hack the Ranch May 2023
Updated July 2023
Build an automated tool that calculates PACAF O&M dollars per head count for the exercise.
docker-compose build
docker-compose up
Because this application is designed to run as a group of containers, development can be painful sometimes due to the nature of how docker images work. PM2 alleviates this by automating running both client and server locally while keeping the database in a container.
To start without changing any files, simply follow the "How to use" steps from above to start, then the following depending on if you are using Docker Desktop or just the Docker CLI
docker-compose up db
docker stop tact-server-1
docker ps
npm install pm2 -g
If you get permission errors, you may need to use sudo
Finally run
./start.sh
Warning If you have a db_data_volume folder in the top directory you may need to remove it if you run into issues with the database not seeding properly, or other server issues.
Keycloak is included as a Docker container, but the container does not save your user data so it needs to be recreated each time the container spins-up. Until we find a way around it, it's recommended to spin-up a local version of the Keycloak container and leave it running instead of using "docker-compose up". Here is the local command to keep this container running to avoid recreating users all the time (replace the X's with your home directory):
docker run --name mykeycloak -p 8180:8180 \ -e KEYCLOAK_ADMIN=kcadmin -e KEYCLOAK_ADMIN_PASSWORD=kcpasswd \ -e KEYCLOAK_IMPORT=/opt/keycloak/data/import/ \ -v "/XXXXX/XXXXX/XXXXX/TACT/Client/keycloak-export":/opt/keycloak/data/import \ quay.io/keycloak/keycloak:latest \ start-dev --http-port=8180 --import-realm
So as long as you run the Keycloak container locally and keep it running, you won't lose your users. It's recommended to create a COCOM Planner user and at least one Wing Planner account.