Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ USER spring:spring

COPY --from=build /workspace/build/libs/*.jar app.jar

EXPOSE 8080
EXPOSE 8080 8081
ENTRYPOINT ["java", "-XX:MaxRAMPercentage=75.0", "-jar", "app.jar"]
13 changes: 5 additions & 8 deletions deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ services:
required: false
ports:
- "80:${APP_PORT}"
- "127.0.0.1:${MANAGEMENT_PORT:-8081}:8081"
env_file: .env
environment:
DB_URL: jdbc:postgresql://${DB_HOST}:5432/${DB_NAME}
Expand All @@ -25,7 +26,7 @@ services:
mem_limit: 768m
logging: *default-logging
healthcheck:
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/8080; echo -e 'GET /actuator/health HTTP/1.0\r\n\r\n' >&3; grep -q UP <&3"]
test: ["CMD", "bash", "-c", "exec 3<>/dev/tcp/localhost/8081; echo -e 'GET /actuator/health HTTP/1.0\r\n\r\n' >&3; grep -q UP <&3"]
interval: 30s
timeout: 5s
retries: 3
Expand All @@ -49,7 +50,7 @@ services:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- pgdata:/var/lib/postgresql/data
- /data/postgres:/var/lib/postgresql/data
Comment thread
SinnoLn marked this conversation as resolved.
mem_limit: 384m
logging: *default-logging
healthcheck:
Expand All @@ -64,15 +65,11 @@ services:
restart: always
command: ["redis-server", "--maxmemory", "64mb", "--maxmemory-policy", "noeviction", "--appendonly", "yes"]
volumes:
- redisdata:/data
- /data/redis:/data
Comment thread
SinnoLn marked this conversation as resolved.
mem_limit: 128m
logging: *default-logging
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 30s
timeout: 3s
retries: 3

volumes:
pgdata:
redisdata:
retries: 3
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ services:
SWAGGER_ENABLED: ${SWAGGER_ENABLED:-true}
ports:
- "${APP_PORT:-8080}:8080"
- "127.0.0.1:${MANAGEMENT_PORT:-8081}:8081"
restart: unless-stopped

volumes:
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ springdoc:
default-produces-media-type: application/json

management:
server:
port: 8081
endpoints:
web:
exposure:
Expand Down
Loading