Skip to content

Commit f2c5c02

Browse files
committed
docker improved
1 parent dfab062 commit f2c5c02

File tree

5 files changed

+36
-9
lines changed

5 files changed

+36
-9
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,28 @@
11
FROM maven:3.8.6-openjdk-18-slim
22

3+
# Create a directory for the application repository
34
RUN mkdir /app-repo
5+
6+
# Copy the project files into the container
47
ADD . /app-repo/
58
WORKDIR /app-repo
69

10+
# Clean and package the application
711
RUN mvn clean
812
RUN mvn package spring-boot:repackage
913

14+
# Expose the application port
1015
EXPOSE 3003
1116

17+
# Environment variables (can be overridden when running the container)
18+
# SPRING_PROFILES_ACTIVE: Specifies the active Spring Boot profile (e.g., gessi)
19+
# DB_USERNAME: GraphDB Database username (set via environment variable for security)
20+
# DB_PASSWORD: GraphDB Database password (set via environment variable for security)
21+
# REPO_NAME: Name of the GraphDB repository
1222
ENV SPRING_PROFILES_ACTIVE=gessi
23+
ENV DB_USERNAME=${DB_USERNAME}
24+
ENV DB_PASSWORD=${DB_PASSWORD}
25+
ENV REPO_NAME=${REPO_NAME}
1326

27+
# Run the Spring Boot application
1428
ENTRYPOINT ["java", "-jar", "./target/repo-0.0.1-SNAPSHOT.jar"]

src/main/resources/application-docker-windows.properties

Lines changed: 0 additions & 4 deletions
This file was deleted.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
transfeatex.url=http://transfeatex:3004/extract-features
22
hub.url=http://re_miner_hub:3002/analyze/kg
33
inductive-knowledge-service.url=http://kg_repository:5001
4-
db.url=http://gessi-chatbots.essi.upc.edu:7200/repositories/MApp-KG_dev
4+
5+
# Database URL (retrieved from the environment variable REPO_NAME, it should be your repo GraphDB name)
6+
db.url=http://gessi-chatbots.essi.upc.edu:7200/repositories/${REPO_NAME}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
transfeatex.url=http://localhost:3004/extract-features
22
hub.url=http://localhost:3002/analyze/kg
33
inductive-knowledge-service.url=http://localhost:5001
4-
db.url=http://gessi-chatbots.essi.upc.edu:7200/repositories/MApp-KG_dev
4+
db.url=http://gessi-chatbots.essi.upc.edu:7200/repositories/${REPO_NAME}
Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,23 @@
1+
# URL of the scanner service to export data
12
scanner-service.url=http://localhost:5500/export-data
3+
4+
# Maximum number of days to consider for reviews
25
max-days-reviews=365
6+
7+
# Spring MVC path matching strategy (ant-based matching for URL patterns)
38
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
9+
10+
# Path to the RML mapping file used for transformation
411
rml.path=rml/extended.rml.ttl
12+
13+
# Server port where the application will run
514
server.port=3003
6-
logging.level.web = INFO
7-
db.username=max_tiessler
8-
db.password=-MkSdJ,-6Qf3N}r
15+
16+
# Logging level for web-related logs
17+
logging.level.web=INFO
18+
19+
# Database username (retrieved from environment variables)
20+
db.username=${DB_USERNAME}
21+
22+
# Database password (retrieved from environment variables)
23+
db.password=${DB_PASSWORD}

0 commit comments

Comments
 (0)