To run the java microservices you need to have application.properties file in location_service, packet_service, user_service (..\src\main\resources\application.properties).
spring.datasource.url= ${your_database_url}
spring.datasource.username= {your_username}
spring.datasource.password= {your_pass}
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
spring.jpa.hibernate.ddl-auto=create
grpc.server.port= {your_port}
(Use different ports for every service)
packet_service port = 9091
location_service port = 9092
user_service port = 9093
- Run maven clean install in java_proto.
- Open gateway and build CSharpProto.
- Open Authentication_provider
- Create a “Config” folder in persistence.
- Inside the folder, create class “DatabaseConfig” with the following constants:
public const string Host = "localhost";
public const string Name = "postgres";
public const string Password = "database_password";
public const string Database = "postgres";
- Run “dotnet ef database update” through the terminal in persistence.
- Create a new exchange “notification_exchange”
- In queues and streams create a new queue called “notification” (if its not auto created)
- To run the application, “Roles” table needs a default value.
- In “authentication_provider” schema, in the table Roles (if it does not exist, create it) then add the following values:
Id | Name |
---|---|
1 | user |
2 | Admin |
If you want to use admin features (like creating/deleting a location), you have to change your account role in the database, to reflect that you are an Admin (Credentials table/RoleId to the Admin roleId).