Skip to content
Closed
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
24 changes: 24 additions & 0 deletions docker-compose.override.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
config-server:
environment:
JAVA_OPTS: "-Xms128m -Xmx256m"

discovery-server:
environment:
JAVA_OPTS: "-Xms128m -Xmx256m"

customers-service:
environment:
JAVA_OPTS: "-Xms128m -Xmx256m"

vets-service:
environment:
JAVA_OPTS: "-Xms128m -Xmx256m"

visits-service:
environment:
JAVA_OPTS: "-Xms128m -Xmx256m"

api-gateway:
environment:
JAVA_OPTS: "-Xms128m -Xmx256m"
210 changes: 105 additions & 105 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,161 +1,161 @@
services:

config-server:
image: springcommunity/spring-petclinic-config-server
container_name: config-server
deploy:
resources:
limits:
memory: 512M
healthcheck:
test: ["CMD", "curl", "-I", "http://config-server:8888"]
interval: 5s
timeout: 5s
retries: 10
image: nicest12/config-server:v2
restart: on-failure
environment:
SPRING_PROFILES_ACTIVE: docker
SERVER_PORT: 8888
ports:
- 8888:8888
- "8888:8888"
networks:
petclinic-network:
aliases:
- config-server
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:8888/actuator/health"]
interval: 20s
timeout: 10s
retries: 15
start_period: 60s

discovery-server:
image: springcommunity/spring-petclinic-discovery-server
container_name: discovery-server
deploy:
resources:
limits:
memory: 512M
healthcheck:
test: ["CMD", "curl", "-f", "http://discovery-server:8761"]
interval: 5s
timeout: 3s
retries: 10
image: nicest12/discovery-server:v2
restart: on-failure
environment:
SPRING_PROFILES_ACTIVE: docker
SERVER_PORT: 8761
CONFIG_SERVER_URL: http://config-server:8888
depends_on:
config-server:
condition: service_healthy
ports:
- 8761:8761
- "8761:8761"
networks:
petclinic-network:
aliases:
- discovery-server
healthcheck:
test: ["CMD", "wget", "--spider", "http://localhost:8761/actuator/health"]
interval: 20s
timeout: 10s
retries: 15
start_period: 90s

customers-service:
image: springcommunity/spring-petclinic-customers-service
container_name: customers-service
deploy:
resources:
limits:
memory: 512M
image: nicest12/customers-service:v2
restart: on-failure
environment:
SPRING_PROFILES_ACTIVE: docker
SERVER_PORT: 8081
CONFIG_SERVER_URL: http://config-server:8888
depends_on:
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
ports:
- 8081:8081
- "8081:8081"
networks:
- petclinic-network

visits-service:
image: springcommunity/spring-petclinic-visits-service
container_name: visits-service
deploy:
resources:
limits:
memory: 512M
image: nicest12/visits-service:v2
restart: on-failure
environment:
SPRING_PROFILES_ACTIVE: docker
SERVER_PORT: 8082
CONFIG_SERVER_URL: http://config-server:8888
depends_on:
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
ports:
- 8082:8082
- "8082:8082"
networks:
- petclinic-network

vets-service:
image: springcommunity/spring-petclinic-vets-service
container_name: vets-service
deploy:
resources:
limits:
memory: 512M
image: nicest12/vets-service:v2
restart: on-failure
environment:
SPRING_PROFILES_ACTIVE: docker
SERVER_PORT: 8083
CONFIG_SERVER_URL: http://config-server:8888
depends_on:
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
ports:
- 8083:8083

- "8083:8083"
networks:
- petclinic-network

genai-service:
image: springcommunity/spring-petclinic-genai-service
container_name: genai-service
api-gateway:
image: nicest12/api-gateway:v2
restart: on-failure
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- AZURE_OPENAI_KEY=${AZURE_OPENAI_KEY}
- AZURE_OPENAI_ENDPOINT=${AZURE_OPENAI_ENDPOINT}
deploy:
resources:
limits:
memory: 512M
SPRING_PROFILES_ACTIVE: docker
SERVER_PORT: 8080
CONFIG_SERVER_URL: http://config-server:8888
SPRING_ZIPKIN_ENABLED: false
MANAGEMENT_ZIPKIN_TRACING_ENDPOINT: http://tracing-server:9411/api/v2/spans
JAVA_OPTS: -XX:MaxRAMPercentage=75 -XX:+UseContainerSupport
depends_on:
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
ports:
- 8084:8084
- "8080:8080"
networks:
- petclinic-network


api-gateway:
image: springcommunity/spring-petclinic-api-gateway
container_name: api-gateway
deploy:
resources:
limits:
memory: 512M
admin-server:
image: nicest12/admin-server:v2
restart: on-failure
environment:
SPRING_PROFILES_ACTIVE: docker
SERVER_PORT: 9090
CONFIG_SERVER_URL: http://config-server:8888
depends_on:
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
ports:
- 8080:8080
- "9090:9090"
networks:
- petclinic-network

tracing-server:
image: openzipkin/zipkin
container_name: tracing-server
deploy:
resources:
limits:
memory: 512M
image: openzipkin/zipkin:3
restart: on-failure
ports:
- 9411:9411
- "9411:9411"
networks:
- petclinic-network

admin-server:
image: springcommunity/spring-petclinic-admin-server
container_name: admin-server
deploy:
resources:
limits:
memory: 512M
depends_on:
config-server:
condition: service_healthy
discovery-server:
condition: service_healthy
prometheus:
image: prom/prometheus:latest
restart: unless-stopped
ports:
- 9090:9090

## Grafana / Prometheus
- "9091:9090"
volumes:
- ./monitoring/prometheus/prometheus.yml:/etc/prometheus/prometheus.yml
networks:
- petclinic-network

grafana-server:
build: ./docker/grafana
container_name: grafana-server
deploy:
resources:
limits:
memory: 256M
grafana:
image: grafana/grafana:latest
restart: unless-stopped
ports:
- 3030:3000
- "3000:3000"
networks:
- petclinic-network

prometheus-server:
build: ./docker/prometheus
container_name: prometheus-server
deploy:
resources:
limits:
memory: 256M
ports:
- 9091:9090
networks:
petclinic-network:
driver: bridge
Loading
Loading