diff --git a/.gitignore b/.gitignore
index 83e93be452565383dbbe7fdd9e8ed31516e9761f..a44aa97b122596b71a01cc79bc11efff82329b68 100644
--- a/.gitignore
+++ b/.gitignore
@@ -34,3 +34,4 @@ build/
 
 ### VS Code ###
 .vscode/
+/bin/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1d49cef836275fbe959a56a7a9644b3f6f337240..9ee248edc546d203181b78de97155780ef348410 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -10,7 +10,7 @@ build:
   only:
     - master
   script:
-    - mvn package
+    - mvn package -Pprod
   artifacts:
     paths:
       - target/*.jar
@@ -25,7 +25,7 @@ test:
   only:
     - master
   script:
-    - mvn test
+    - mvn test -Pprod
   tags:
     - kubernetes
     - smart-harvester
diff --git a/pom.xml b/pom.xml
index 1568ab736e6fc3674da3c698029f808a8b076b14..9e54627ab8af5213e2bf1bcf9275cfd3a56ed188 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,7 @@
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-security</artifactId>
 		</dependency>
-		
+
 		<dependency>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-starter-webflux</artifactId>
@@ -138,4 +138,29 @@
 		</plugins>
 	</build>
 
+	<profiles>
+		<profile>
+			<id>dev</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<properties>
+				<activatedProperties>dev</activatedProperties>
+			</properties>
+		</profile>
+		<profile>
+			<id>prod</id>
+			<properties>
+				<activatedProperties>prod</activatedProperties>
+			</properties>
+		</profile>
+		<profile>
+			<id>staging</id>
+			<properties>
+				<activatedProperties>staging</activatedProperties>
+			</properties>
+		</profile>
+		
+	</profiles>
+
 </project>
diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties
new file mode 100644
index 0000000000000000000000000000000000000000..76808169cf12f44070bb2c80cf891963bb0a8d68
--- /dev/null
+++ b/src/main/resources/application-dev.properties
@@ -0,0 +1,50 @@
+
+# 1. For pretty print
+spring.jackson.serialization.indent-output=true
+
+#2. Application configuration.
+server.port=8080
+
+# 3. MongoDB configuration.
+#spring.data.mongodb.uri=mongodb://admin:adminadmin@mongo2.f2ds.svc.cluster.local:27017/fdp?authSource=admin
+spring.data.mongodb.host=146.59.2.87
+spring.data.mongodb.port=27017
+spring.data.mongodb.database=fdp
+spring.data.mongodb.authentication-database=admin
+spring.data.mongodb.username=admin
+spring.data.mongodb.password=adminadmin
+
+# 4. Logging configuration.
+logging.level.com.assignment.springboot.mongo=DEBUG
+logging.pattern.console= %d{yyyy-MM-dd HH:mm:ss} - %msg%n
+
+# 5. CORS
+cors.allowed-origins = http://localhost:4200
+
+# 6.JWT
+smartharvester.app.jwt.header=Authorization
+smartharvester.app.jwtSecret=dora
+smartharvester.app.jwtExpirationMs=86400000
+smartharvester.app.jwt.route.authentication.path=/auth
+smartharvester.app.jwt.route.authentication.refresh=/refresh
+
+# 7. Swagger
+springdoc.api-docs.path=/smart-docs
+springdoc.swagger-ui.path=/smart-harvester/open-api.html
+springdoc.model-and-view-allowed=false
+
+
+# 8. Error Handling
+server.error.whitelabel.enabled=false
+server.error.path=/error
+
+#9. F2DS Settings Filename
+f2dp.settings.filename=/f2pconf/settings.json
+
+
+spring.security.oauth2.client.provider.oidc.issuer-uri=https://iam-pillar.cloud.cnaf.infn.it/
+
+spring.security.oauth2.client.registration.oidc.client-id=a03a6ac2-acfe-4916-9d0f-db874ea94e75
+spring.security.oauth2.client.registration.oidc.client-secret=cLONCJ8MccdHwobCEMSl_sYDJGKpmBxH16SyiRIBx8XeoDa2ZLwzTvF_aVoEeOt3h2sNbZqltRqhfHKeI3g7Dw
+spring.security.oauth2.client.registration.oidc.scope=address,phone,openid,email,profile
+spring.security.oauth2.client.registration.oidc.redirect-uri=http://localhost:4200/callback
\ No newline at end of file
diff --git a/src/main/resources/application-prod.properties b/src/main/resources/application-prod.properties
new file mode 100644
index 0000000000000000000000000000000000000000..a96b8cea6b959849802017a669b943a2acb99ba0
--- /dev/null
+++ b/src/main/resources/application-prod.properties
@@ -0,0 +1,47 @@
+
+# 3. MongoDB configuration.
+spring.data.mongodb.uri=mongodb://admin:adminadmin@mongo2.f2ds.svc.cluster.local:27017/fdp?authSource=admin
+#spring.data.mongodb.host=146.59.2.87
+#spring.data.mongodb.port=27017
+#spring.data.mongodb.database=fdp
+#spring.data.mongodb.authentication-database=admin
+#spring.data.mongodb.username=admin
+#spring.data.mongodb.password=adminadmin
+
+# 4. Logging configuration.
+logging.level.com.assignment.springboot.mongo=DEBUG
+logging.pattern.console= %d{yyyy-MM-dd HH:mm:ss} - %msg%n
+
+# 5. CORS
+cors.allowed-origins = http://localhost:4200
+
+# 6.JWT
+smartharvester.app.jwt.header=Authorization
+smartharvester.app.jwtSecret=dora
+smartharvester.app.jwtExpirationMs=86400000
+smartharvester.app.jwt.route.authentication.path=/auth
+smartharvester.app.jwt.route.authentication.refresh=/refresh
+
+# 7. Swagger
+springdoc.api-docs.path=/smart-docs
+springdoc.swagger-ui.path=/smart-harvester/open-api.html
+springdoc.model-and-view-allowed=false
+
+
+# 8. Error Handling
+server.error.whitelabel.enabled=false
+server.error.path=/error
+
+#9. F2DS Settings Filename
+f2dp.settings.filename=/f2pconf/settings.json
+
+
+spring.security.oauth2.client.provider.oidc.issuer-uri=https://iam-pillar.cloud.cnaf.infn.it/
+
+spring.security.oauth2.client.registration.oidc.client-id=a03a6ac2-acfe-4916-9d0f-db874ea94e75
+spring.security.oauth2.client.registration.oidc.client-secret=cLONCJ8MccdHwobCEMSl_sYDJGKpmBxH16SyiRIBx8XeoDa2ZLwzTvF_aVoEeOt3h2sNbZqltRqhfHKeI3g7Dw
+spring.security.oauth2.client.registration.oidc.scope=address,phone,openid,email,profile
+spring.security.oauth2.client.registration.oidc.redirect-uri=https://f2ds.eosc-pillar.eu/callback
+
+
+
diff --git a/src/main/resources/application-staging.properties b/src/main/resources/application-staging.properties
new file mode 100644
index 0000000000000000000000000000000000000000..06e24dc02c633118642a9bf8e7a5c5b2089465e9
--- /dev/null
+++ b/src/main/resources/application-staging.properties
@@ -0,0 +1,44 @@
+
+# 3. MongoDB configuration.
+spring.data.mongodb.uri=mongodb://admin:adminadmin@mongo2.f2ds.svc.cluster.local:27017/fdp?authSource=admin
+#spring.data.mongodb.host=146.59.2.87
+#spring.data.mongodb.port=27017
+#spring.data.mongodb.database=fdp
+#spring.data.mongodb.authentication-database=admin
+#spring.data.mongodb.username=admin
+#spring.data.mongodb.password=adminadmin
+
+# 4. Logging configuration.
+logging.level.com.assignment.springboot.mongo=DEBUG
+logging.pattern.console= %d{yyyy-MM-dd HH:mm:ss} - %msg%n
+
+# 5. CORS
+cors.allowed-origins = http://localhost:4200
+
+# 6.JWT
+smartharvester.app.jwt.header=Authorization
+smartharvester.app.jwtSecret=dora
+smartharvester.app.jwtExpirationMs=86400000
+smartharvester.app.jwt.route.authentication.path=/auth
+smartharvester.app.jwt.route.authentication.refresh=/refresh
+
+# 7. Swagger
+springdoc.api-docs.path=/smart-docs
+springdoc.swagger-ui.path=/smart-harvester/open-api.html
+springdoc.model-and-view-allowed=false
+
+
+# 8. Error Handling
+server.error.whitelabel.enabled=false
+server.error.path=/error
+
+#9. F2DS Settings Filename
+f2dp.settings.filename=/f2pconf/settings.json
+
+spring.security.oauth2.client.provider.oidc.issuer-uri=https://iam-pillar.cloud.cnaf.infn.it/
+
+spring.security.oauth2.client.registration.oidc.client-id=a03a6ac2-acfe-4916-9d0f-db874ea94e75
+spring.security.oauth2.client.registration.oidc.client-secret=cLONCJ8MccdHwobCEMSl_sYDJGKpmBxH16SyiRIBx8XeoDa2ZLwzTvF_aVoEeOt3h2sNbZqltRqhfHKeI3g7Dw
+spring.security.oauth2.client.registration.oidc.scope=address,phone,openid,email,profile
+spring.security.oauth2.client.registration.oidc.redirect-uri=https://f2ds-dev.eosc-pillar.eu/callback
+
diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties
index c243e684893f76937472cb0e680f0159103749c1..e4558392dffd92fb91a823c05e14fe85ec1810e7 100644
--- a/src/main/resources/application.properties
+++ b/src/main/resources/application.properties
@@ -1,52 +1,7 @@
 # SMART HARVESTER Application Properties
+spring.profiles.active=@activatedProperties@
 
-# 1. For pretty print
-spring.jackson.serialization.indent_output=true
 
-#2. Application configuration.
-server.port=8080
 
-# 3. MongoDB configuration.
-#spring.data.mongodb.uri=mongodb://admin:adminadmin@51.178.69.150:27017/fdp?authSource=admin
-spring.data.mongodb.host=146.59.2.87
-spring.data.mongodb.port=27017
-spring.data.mongodb.database=fdp
-spring.data.mongodb.authentication-database=admin
-spring.data.mongodb.username=admin
-spring.data.mongodb.password=adminadmin
-
-# 4. Logging configuration.
-logging.level.com.assignment.springboot.mongo=DEBUG
-logging.pattern.console= %d{yyyy-MM-dd HH:mm:ss} - %msg%n
-
-# 5. CORS
-cors.allowed-origins = http://localhost:4200
-
-# 6.JWT
-smartharvester.app.jwt.header=Authorization
-smartharvester.app.jwtSecret=dora
-smartharvester.app.jwtExpirationMs=86400000
-smartharvester.app.jwt.route.authentication.path=/auth
-smartharvester.app.jwt.route.authentication.refresh=/refresh
-
-# 7. Swagger
-springdoc.api-docs.path=/smart-docs
-springdoc.swagger-ui.path=/smart-harvester/open-api.html
-springdoc.model-and-view-allowed=false
-
-
-# 8. Error Handling
-server.error.whitelabel.enabled=false
-server.error.path=/error
-
-#9. F2DS Settings Filename
-f2dp.settings.filename=/f2pconf/settings.json
-
-spring.security.oauth2.client.provider.oidc.issuer-uri=https://iam-pillar.cloud.cnaf.infn.it/
-
-spring.security.oauth2.client.registration.oidc.client-id=a03a6ac2-acfe-4916-9d0f-db874ea94e75
-spring.security.oauth2.client.registration.oidc.client-secret=cLONCJ8MccdHwobCEMSl_sYDJGKpmBxH16SyiRIBx8XeoDa2ZLwzTvF_aVoEeOt3h2sNbZqltRqhfHKeI3g7Dw
-spring.security.oauth2.client.registration.oidc.scope=address,phone,openid,email,profile
-spring.security.oauth2.client.registration.oidc.redirect-uri=https://f2ds.eosc-pillar.eu/callback
 
 
diff --git a/version b/version
index 2b26aeda6eddc1adf6ec631155abcc39a67ab650..85937e4d984db06caef7b9af6e1746bfd9f9de0c 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-v4
\ No newline at end of file
+v4.0.1
\ No newline at end of file