Skip to content

Commit

Permalink
working on doc and changing conf file of backend to use .sec.conf on …
Browse files Browse the repository at this point in the history
…windows
  • Loading branch information
ooemperor committed Mar 13, 2024
1 parent d69489c commit cb8dd79
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 8 deletions.
2 changes: 1 addition & 1 deletion codeGrader/backend/config/Config.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def __init__(self):
"""
self.system = platform.system()
if self.system == 'Windows':
configFile = os.path.join(os.path.dirname(__file__), "config.conf")
configFile = os.path.join(os.path.dirname(__file__), "config.sec.conf")
code = open(os.path.join(os.path.dirname(__file__), "codeLanguages.json"))
elif self.system == 'Linux':
configFile = "/etc/codeGrader/backendConfig.conf"
Expand Down
12 changes: 6 additions & 6 deletions codeGrader/backend/config/config.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,26 @@ sender = <MAIL_SENDER_ADDRESS>
[Database]
Dialect = postgresql
DBDriver = psycopg2
Username = codeGrader
Password = codeGrader
Host = 10.101.10.80
Username = <DB_USERNAME>
Password = <DB_PASSWORD>
Host = 127.0.0.1
Port = 5432
Database = codeGraderDB
Database = <DATABASE_NAME>

MetaDataColumnsCount = 3
ColumnIgnoreList = [id, creation_dts, updated_dts]


[ExecutionService]
Host = 10.101.10.80
Host = 127.0.0.1
Port = 8003
PathToExecutionFiles = /opt
IP_Address_Whitelist = [127.0.0.1]
LXC_Install_Command = -t download -- -r bullseye -a amd64 -d debian


[EvaluationService]
Host = 10.101.10.80
Host = 127.0.0.1
Port = 8002
IP_Address_Whitelist = [127.0.0.1]

Expand Down
22 changes: 22 additions & 0 deletions doc/Installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,25 @@ nohup cgExecutionService &
nohup cgUserFrontend &
nohup cgAdminFrontend &
```

## Services
If you want to run the 5 steps above as services under linux, please visit the services folder where you can finde the .service files. \
\
On debian you would need to copy these in the ```/etc/systemd/system``` \
After moving the files in this directory complete the startup with the following commands:
```
systemctl daemon-reload
systemd enable cgApiBackend.service
systemd enable cgEvaluationService.service
systemd enable cgExecutionService.service
systemd enable cgUserFrontend.service
systemd enable cgAdminFrontend.service
systemctl start cgApiBackend.service
systemctl start cgEvaluationService.service
systemctl start cgExecutionService.service
systemctl start cgUserFrontend.service
systemctl start cgAdminFrontend.service
```

3 changes: 2 additions & 1 deletion doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

Within this fodler you will find the documentation for the codeGrader.

This includes how to install, run and even more detailed information about the project.
## Installation
The guide for the setup can be found in the Installation.md File
2 changes: 2 additions & 0 deletions doc/Requirements/Requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ All of the frontend requirements can be mapped to a backend requirement.

The frontend requirements will be generalized and then transferred to the backend.

The requirements here are just a draft and are not to be taken as complete.

# Frontend

## Admin Site
Expand Down

0 comments on commit cb8dd79

Please sign in to comment.