GUC SwitchHub automates the hassle of tutorial group switching between students at the GUC.
-
Make sure that Docker is installed and started on your machine.
-
Make sure that you have a working internet connection.
-
Navigate to the project folder using the terminal.
-
Use docker-compose up -d --build command to start the website and all the accompained services after adding the config.json file (Details below).
Command Flags:
-d: used to run the command in the daemon mode.
--build: used to ensure that the running version will be the latest build.
- Use cat database.sql | docker-compose exec -T db psql -U root GUCSwitchHubDB command to reflect changes from the database.sql file to the GUCSwitchHubDB
Command Flags:
-U: dbUser
GUCSwitcHubDB: The dbName
- Do another docker-compose up -d --build to ensure that everything is running as expected.
You are required to create a JSON config file, named config.json, place it in the project directory on the same level as the main.go file.
{
"dbHost": "exampleHost",
"dbUser": "exampleUser",
"dbPassword": "examplePassword",
"dbName": "exampleDbName"
}
- go get -u github.com/kardianos/govendor (If it is not installed)
- Inside the project directory run the govendor init command to create the vendor folder and vendor.json file
- run govendor add +e command to add the dependencies to the vendor.json file.