-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eeb6871
commit 4cf87ac
Showing
16 changed files
with
218 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,3 +31,4 @@ build/ | |
|
||
### VS Code ### | ||
.vscode/ | ||
/src/main/resources/application-localdev.properties |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM openjdk:17-oracle | ||
ARG JAR_FILE=target/*.jar | ||
COPY ${JAR_FILE} app.jar | ||
EXPOSE 8080 | ||
ENTRYPOINT ["java","-jar","/app.jar"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
version: "2.2" | ||
services: | ||
# App backend service | ||
|
||
db: | ||
image: mysql:5.7 | ||
container_name: facility_management_db | ||
volumes: | ||
- facility_management_db:/var/lib/mysql | ||
restart: always | ||
ports: | ||
- "6001:3306" | ||
environment: | ||
MYSQL_ROOT_PASSWORD: 4P2bauIt7WIdpXnd | ||
MYSQL_DATABASE: facility_management | ||
MYSQL_PASSWORD: 4P2bauIt7WIdpXnd | ||
networks: | ||
network: | ||
ipv4_address: 172.95.0.2 | ||
|
||
app-server: | ||
# Configuration for building the docker image for the backend service | ||
container_name: facility_management_be | ||
build: | ||
context: facilityManager | ||
dockerfile: Dockerfile | ||
ports: | ||
- 6003:8080 # Forward the exposed port 8080 on the container to port 5002 on the host machine | ||
restart: always | ||
depends_on: | ||
- db # This service depends on mysql. Start that first. | ||
environment: # Pass environment variables to the service | ||
- spring.profiles.active=prod | ||
- spring.datasource.url=jdbc:mysql://db:3306/facility_management?useSSL=false&serverTimezone=UTC | ||
- spring.datasource.username=root | ||
- spring.datasource.password=4P2bauIt7WIdpXnd | ||
networks: | ||
network: | ||
ipv4_address: 172.95.0.3 | ||
|
||
# for php myadmin goto http://localhost:5001 | ||
phpmyadmino: | ||
container_name: facility_management_db_phpmyadmin | ||
depends_on: | ||
- db | ||
image: phpmyadmin | ||
restart: always | ||
ports: | ||
- "6002:80" | ||
environment: | ||
PMA_HOST: db | ||
MYSQL_ROOT_PASSWORD: 4P2bauIt7WIdpXnd | ||
networks: | ||
network: | ||
ipv4_address: 172.95.0.4 | ||
|
||
volumes: | ||
facility_management_db: | ||
|
||
networks: | ||
network: | ||
driver: bridge | ||
ipam: | ||
config: | ||
- | ||
subnet: 172.95.0.0/16 | ||
gateway: 172.95.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/main/java/it/bruffa/facilitymanager/model/dto/request/RegisterUserRequestDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package it.bruffa.facilitymanager.model.dto.request; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import jakarta.validation.constraints.Email; | ||
import jakarta.validation.constraints.NotBlank; | ||
import jakarta.validation.constraints.NotNull; | ||
import lombok.Data; | ||
|
||
@Data | ||
public class RegisterUserRequestDto { | ||
@NotBlank | ||
@Schema(description = "First name of the user", example = "Mario") | ||
private String firstName; | ||
|
||
@NotBlank | ||
@Schema(description = "Last name of the user", example = "Rossi") | ||
private String lastName; | ||
|
||
@NotBlank | ||
@Schema(description = "Email of the user", example = "mariorossi@gmail.com") | ||
private String email; | ||
|
||
@NotNull | ||
@Schema(description = "Latitude of the user", example = "45.123456") | ||
private Double latitude; | ||
|
||
@NotNull | ||
@Schema(description = "Longitude of the user", example = "9.123456") | ||
private Double longitude; | ||
|
||
@NotBlank | ||
@Schema(description = "Role of the user", example = "ROLE_USER / ROLE_ADMIN / ROLE_CLEANER / ROLE_MAINTAINER") | ||
private String role; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
spring.datasource.url=jdbc:mysql://db:3306/facility_management?useSSL=false&serverTimezone=UTC&allowPublicKeyRetrieval=true | ||
spring.datasource.username=root | ||
spring.datasource.password=4P2bauIt7WIdpXnd | ||
spring.datasource.driverClassName=com.mysql.cj.jdbc.Driver | ||
spring.jpa.show-sql=true | ||
spring.jpa.hibernate.ddl-auto=update | ||
|
||
|
||
|
||
mail.username=software@gmail.com | ||
mail.password=ekssdfsdfob |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,18 @@ | ||
spring.profiles.active=dev | ||
spring.profiles.active=localdev | ||
spring.jpa.properties.hibernate.hbm2dll.create_namespaces=true | ||
server.port=8080 | ||
|
||
springdoc.enable-native-support=true | ||
springdoc.swagger-ui.path=/swagger-ui.html | ||
#MQTT dashboard to test | ||
#https://mqtthq.com/client | ||
|
||
#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 | ||
#Swagger UI | ||
# http://localhost:8080/swagger-ui/index.html | ||
|
||
#H2 console | ||
#SCRIPT TO 'data_init.sql' | ||
|
||
#cd facilityManager/ | ||
#git pull | ||
#mvn -U clean package install -DskipTests | ||
#docker-compose up --no-deps --build |
Oops, something went wrong.