Table of contents
Members:
- Gracis Riccardo (s287961)
- Giuseppe Gagliardi (s286286)
- Marco Riggio (s292515)
- Martina Saugo (s285326)
- Mattia Riola (s280169)
- Stefano Griva (s287729)
The full documents are in the Documents
folder
developer environment time machine developer deploy and configuration
requirement:
-
docker installed steps:
-
clone this repository
-
be sure that the following ports are free: 8080, 3000, 3306.
- if you want change the listening port in our application you can copy the
docker-compose.template.yourtemplate.yml
in a new file calleddocker-compose.override.yml
and change the settings that you want
- if you want change the listening port in our application you can copy the
-
Run the application:
docker-compose up -d
(you may need admin privileges)- this command will download our docker images and will run all the services needed by the application (DB, FE, BE)
- to be sure that the service are running you can use the command
docker ps -a
and check the status column - in order to see the logs of the services use the
docker logs -f service_name
command (where service_name can bespg_server
spg_database
orspg_frontend
)
if you want reset the local db you can simply run the commands
- shut down the services and remove the container, you can do this with this commang:
docker-compose down
- execute this command to remove the volume used by mysql:
docker volume rm spg_mysql-persistent-volume
Currently the email server is linked to a MailTrap account ([email protected]), the number of mail available is 500 per month.
By the way the mail server(which is using SMTP) could be set up using other credentials and/or mail server (if yoo want to use a real mail server a security channel on TLS should be used).
The application.properties
file in the main
package can be edited in order to seu up correctly the mail server.
Pay attention to not edit the application.properties
file in the test
package since this is working on GreenMail
SMTP mock server, if wrongly edited some test will crash.
You can simply use an ide like IntelliJ and run the SpgApplication
in our server/src folder
- WARNING: you may need to add the maven project selecting the
pom.xml
file in server/spg
go in fronted/spg-frontend folder
- use the command
npm install
to install in your local machine the node_modules needed to run the react application
- once the installation is completed use the command
npm start
to start the react application
-
customer:
- username: [email protected]
- password: password
-
shop employee:
-
username: [email protected]
-
password: password
-
username: [email protected]
-
password: password
-
-
farmer:
-
username: [email protected]
-
password: password
-
username: [email protected]
-
password: password
-