Besseau Léonard, Do Vale Lopes Miguel
13.10.2021
Use the command provided in the lab directory to create the container. Your working directory should be the cloned git repository, where you can see the folder site.
docker run -ti -v "$PWD/site":/usr/share/nginx/ -d -p 8080:80 --name sti_project --hostname sti arubinst/sti:project2018A container named sti_project should have been created.
After you created the container, you can run the script run-container.sh in the folder docker to start the container.
You can now access the login page by going to http://localhost:8080/ in your browser.
Before going any further with the website. Please check that your directory database and the file database.sqlite can be written. If not, change the permissions to allow it.
In Linux:
chmod o+w site/database site/database/database.sqliteThis is the first page, you will see when accessing the website:
We provided you two accounts to play with:
| password | role | |
|---|---|---|
| admin@penguin.ice | 1234 | admin |
| colabo@penguin.ice | 4321 | collaborator |
Once you logged in successfully, you will see the home page with the inbox of the account. You can also click on Home in the navigation bar to access it:
Each message is listed by date (the newest at the top). You can see the author of the message, the subject and the date when it was sent. You have 3 direct interactions with the message:
-
delete - Click on
delete. Your message should no longer be visible. -
display - Click on
displayto see the content (body) of the message: -
respond - Click on
Respondto respond to author of the message. Click onsend, when your done:
To send a new message, simply click on New message in the navigation bar :
The form is the same as a direct response, you can then fill it and click on Send to send the message.
Click on Change password in the navigation bar to change your password:
Click then on Change to validate the modification.
This option is only visible in the navigation bar for the administrators. Click on it to access the user management:
The first form is to add a new user. Click on Add to validate. A message as below should be displayed:
You can choose a user by his email and then click on Delete to delete. A message as below should be displayed:
As before, choose the user by his email and then click on Edit to edit him. You can then edit his password, role and activeness in by completing the form below and clicking on Edit:
Note: don't fill the password if you don't want to change it
Simply click on Logout in the navigation bar to logout. This will redirect you back to the login page.









