feature/Move docker to the development folder

This commit is contained in:
Marko Milić 2025-11-27 15:42:03 +01:00
parent 194d1cc7e8
commit 72dca46865
9 changed files with 35 additions and 25 deletions

View File

@ -1,7 +1,10 @@
# Existing configuration exclusions # Configuration files - exclude potentially sensitive props but allow templates and default configs
obp-api/src/main/resources/props/* obp-api/src/main/resources/props/*
!obp-api/src/main/resources/props/sample.props.template !obp-api/src/main/resources/props/sample.props.template
!obp-api/src/main/resources/props/test.default.props.template !obp-api/src/main/resources/props/test.default.props.template
!obp-api/src/main/resources/props/test.default.props
!obp-api/src/main/resources/props/default.props
!obp-api/src/main/resources/props/development.default.props
# IDE and editor files # IDE and editor files
.idea/ .idea/
@ -60,8 +63,8 @@ README.md
# Docker files themselves (avoid recursive copies) # Docker files themselves (avoid recursive copies)
Dockerfile Dockerfile
docker/ development/docker/
!docker/entrypoint.sh !development/docker/entrypoint.sh
# Test and development files # Test and development files
ideas/ ideas/

View File

@ -21,7 +21,7 @@ EXPOSE 8080
RUN mvn install -pl .,obp-commons -am -DskipTests RUN mvn install -pl .,obp-commons -am -DskipTests
# Copy entrypoint script that runs mvn with needed JVM flags # Copy entrypoint script that runs mvn with needed JVM flags
COPY docker/entrypoint.sh /app/entrypoint.sh COPY development/docker/entrypoint.sh /app/entrypoint.sh
RUN chmod +x /app/entrypoint.sh RUN chmod +x /app/entrypoint.sh
# Use script as entrypoint # Use script as entrypoint

View File

@ -0,0 +1,7 @@
version: "3.8"
services:
obp-api:
volumes:
- ../../obp-api:/app/obp-api
- ../../obp-commons:/app/obp-commons

View File

@ -0,0 +1,21 @@
version: "3.8"
services:
obp-api:
build:
context: ../..
dockerfile: development/docker/Dockerfile
ports:
- "8080:8080"
environment:
# Set Lift props location to find your props files
- props.resource.dir=/app/props/
- JAVA_OPTS=-Drun.mode=production -Dprops.resource.dir=/app/props/
volumes:
# Mount the props directory so the container uses your local props files
- ../../obp-api/src/main/resources/props:/app/props
extra_hosts:
# Connect to local Postgres on the host
# In your config file:
# db.url=jdbc:postgresql://host.docker.internal:5432/YOUR_DB?user=YOUR_DB_USER&password=YOUR_DB_PASSWORD
- "host.docker.internal:host-gateway"

View File

@ -1,7 +0,0 @@
version: "3.8"
services:
obp-api:
volumes:
- ../obp-api:/app/obp-api
- ../obp-commons:/app/obp-commons

View File

@ -1,14 +0,0 @@
version: "3.8"
services:
obp-api:
build:
context: ..
dockerfile: docker/Dockerfile
ports:
- "8080:8080"
extra_hosts:
# Connect to local Postgres on the host
# In your config file:
# db.url=jdbc:postgresql://host.docker.internal:5432/YOUR_DB?user=YOUR_DB_USER&password=YOUR_DB_PASSWORD
- "host.docker.internal:host-gateway"