This Repo contains the code for the CST Clubhouse WebApp used the workshop.
The following tools must be installed on your system to run the project:
- Docker
- Git
- Code Editor / IDE (RubyMine/VSCode)
You may have to run the following git global config to set your username and email:
git config --global user.name "your-username"
git config --global user.email "youremail@example.com"- Clone the repository
git clone https://github.com/selisebt/rails-clubs.git- Change directory to the project folder
cd rails-clubs
pwd- Run the following command to run the project in a docker container for development
# Use Powershell if you are on windows.
# Replace PWD with the absolute path to the project folder (use pwd output from above)
docker run --name cst-clubhouse -v PWD:/app -p 3000:3000 -d ruby:3.4.2 tail -f /dev/null
This will create a docker container with the name cst-clubhouse and run the tail -f /dev/null command to keep the container running.
- Run the following command to check if the container is running
docker ps- Use the following command to enter the container
docker exec -it cst-clubhouse bash
cd app/- (In the next session) Run the following commands inside the container to run the rails project
bundle install
rails db:create
rails db:migrate
rails s -b 0.0.0.0The following commands are useful when working with git for this workshop:
Run these commands in the project folder.
- Check the status of the project
git status- Change Branch
git fetch && git checkout <branch-name>- Reset all changes (run this before switching/checking out to another branch)
git checkout .
git clean -ffdx
The following branches are available in the project:
main- The main branch of the projectfeature/rails-setup-0- Rails setupfeature/devise-setup-1- Devise setupfeature/db-models-2- Database modelsfeature/user-management-3- User managementfeature/fe/user-management-4- User management frontendfeature/clubs-5- Clubsfeature/fe/clubs-6- Clubs frontendfeature/club-api-tests-7- Club API tests setupfeature/club-api-tests-7.1- Club API testsfeature/announcements-8- Announcementsfeature/fe/announcements-9- Announcements frontendfeature/events-10- Eventsfeature/fe/events-11- Events frontendfeature/event-reminder-12- Event remainderfeature/budgeting-13- Budgetingfeature/fe/budgeting-14- Budgeting frontendfeature/containerization-15- Containerizationfeature/CICD-16- CI/CD