Skip to content
Snippets Groups Projects
Commit ec63d59c authored by Diana Gulčíková's avatar Diana Gulčíková
Browse files

Merge branch 'milestone_2' into 'main'

Milestone 2

See merge request !61
parents 81fdc50b 4521ef5e
No related branches found
No related tags found
1 merge request!61Milestone 2
Pipeline #
......@@ -33,16 +33,20 @@ the car.
## Project structure
Project contains following modules as microservices:
Project contains following modules as microservices.
### common_library
This README contains commands to run individual components as well as commands
to create Docker images. Each image can run on its own, or you can run the whole
app using Docker Compose in project root folder:
`mvn -pl common_library spring-boot:run`
`> docker-compose up`
## common library
Common classes used across the application.
### car
## car
`mvn -pl car spring-boot:run`
......@@ -54,23 +58,50 @@ with the same name as the given component of the car that is not used by the car
WARNING: when putting components or drivers, services component and driver need to run.
### component
##### Run component using Docker:
Create the image:
`> docker build --no-cache -t pa165-formula-one-team-car`
Run the image:
`> docker run -p 8082:8082 pa165-formula-one-team-car`
## component
`mvn -pl component spring-boot:run`
Management of components.
Runs on port 8084.
#### Run component using Docker:
Create the image:
`> docker build --no-cache -t pa165-formula-one-team-component`
Run the image:
`> docker run -p 8084:8084 pa165-formula-one-team-component`
### driver
## driver
`mvn -pl driver spring-boot:run`
Management of drivers.
Runs on port 8083.
#### Run component using Docker:
Create the image:
### race
`> docker build --no-cache -t pa165-formula-one-team-driver`
Run the image:
`> docker run -p 8083:8083 pa165-formula-one-team-driver`
## race
`mvn -pl race spring-boot:run`
......@@ -85,6 +116,15 @@ Corresponding services need to run when also assigning drivers or cars in other
Runs on port 8081.
#### Run component using Docker:
Create the image:
`> docker build --no-cache -t pa165-formula-one-team-race`
Run the image:
`> docker run -p 8081:8081 pa165-formula-one-team-race`
## Diagrams
### Use case
......
......@@ -16,7 +16,7 @@ spring:
hibernate:
ddl-auto: update
datasource:
url: jdbc:h2:file:./src/main/resources/data/car;MODE=PostgreSQL
url: jdbc:h2:file:./car/src/main/resources/data/car;MODE=PostgreSQL
driverClassName: org.h2.Driver
username: admin
password: admin
......@@ -16,7 +16,7 @@ spring:
hibernate:
ddl-auto: update
datasource:
url: jdbc:h2:file:./src/main/resources/data/component;MODE=PostgreSQL
url: jdbc:h2:file:./component/src/main/resources/data/component;MODE=PostgreSQL
driverClassName: org.h2.Driver
username: admin
password: admin
\ No newline at end of file
......@@ -16,7 +16,7 @@ spring:
hibernate:
ddl-auto: update
datasource:
url: jdbc:h2:file:./src/main/resources/data/driver;MODE=PostgreSQL
url: jdbc:h2:file:./driver/src/main/resources/data/driver;MODE=PostgreSQL
driverClassName: org.h2.Driver
username: admin
password: admin
......@@ -16,7 +16,7 @@ spring:
hibernate:
ddl-auto: update
datasource:
url: jdbc:h2:file:./src/main/resources/data/race;MODE=PostgreSQL
url: jdbc:h2:file:./race/src/main/resources/data/race;MODE=PostgreSQL
driverClassName: org.h2.Driver
username: admin
password: admin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment