Skip to content
Snippets Groups Projects
Forked from HCI / project_cresendo
Source project has a limited visibility.

Steps to run the full stack in local environment:

docker-compose down -> Will delete old containers

docker-compose build --no-cache -> Build new containers and copy updated files to containers

docker-compose up -> run new containers

note: If you only edit the frontend, you only need to rebuild the frontend. So to make the process faster you can do "docker-compose build --no-cache frontend". The same applies to backend.

Steps to commit backend docker image to cluster

cd ./backend

docker build --platform=linux/amd64 -t container.cs.vt.edu/fhurtado14/corps-directory/backend:latest .

docker push container.cs.vt.edu/fhurtado14/corps-directory/backend:latest

Go to CS Launch and scale down backend deployment to 0, then scale back up to 1.

Steps to commit frontend docker image to cluster

cd ./frontend

docker build --platform=linux/amd64 -t container.cs.vt.edu/fhurtado14/corps-directory/frontend:latest .

docker push container.cs.vt.edu/fhurtado14/corps-directory/frontend:latest

Go to CS Launch and scale down backend deployment to 0, then scale back up to 1.

Steps to create a branch and merge request on git lab

To make a branch do: git checkout -b Branch-Name

Go into your branch: git checkout Branch-Name

To push your local changes to remote git: git push --set-upstream origin Branch-Name

To merge go to GitLab. Click merge request tab. Click new merge request. Fill out the information. Assign to members if you want branch to be tested before merged. They will have to approve your branch in order for it to be merged. Make sure you check "delete source branch when merge request is accepted" and "squash commits when merge request is accepted."

If you are assigned a merge-request you can view them on the merge-request tab on GitLab. You will have to switch to their branch by doing git checkout Branch-Name to test their branch. Note: You can only switch to their branch if you have pulled in an up to date main branch. For example let's say I did a "git push --set-upstream origin test-branch" so it could connect with git. If I did that after you last pulled, then you won't be able to switch into it until you git pull again.

After merge happens: Switch back to main: git checkout main Pull changes from remote repository: git pull origin main

Integration tests

docker-compose -f docker-compose.test.yml up --build docker-compose -f docker-compose.test.yml down -v --remove-orphans