docker-compose.yml
| 1 |
services:
|
|---|---|
| 2 |
nginx-lb:
|
| 3 |
image: nginx:latest |
| 4 |
ports:
|
| 5 |
- "7443:7443"
|
| 6 |
volumes:
|
| 7 |
- ./nginx.conf:/etc/nginx/nginx.conf:ro
|
| 8 |
depends_on:
|
| 9 |
- FWD_server
|
| 10 |
networks:
|
| 11 |
- app-net
|
| 12 |
|
| 13 |
locator:
|
| 14 |
image: apachegeode/geode |
| 15 |
ports:
|
| 16 |
- "10334:10334"
|
| 17 |
- "7070:7070"
|
| 18 |
command: bash -c "gfsh start locator --name=locator --force && tail -f locator/locator.log" |
| 19 |
networks:
|
| 20 |
- app-net
|
| 21 |
healthcheck:
|
| 22 |
test: ["CMD", "gfsh", "-e", "connect --locator=localhost[10334]", "-e", "status locator --name=locator"] |
| 23 |
interval: 10s |
| 24 |
timeout: 10s |
| 25 |
retries: 5 |
| 26 |
start_period: 10s |
| 27 |
|
| 28 |
FWD_server:
|
| 29 |
image: my-server-image |
| 30 |
ports:
|
| 31 |
# Map host ports 3333-3343 to container port 3333
|
| 32 |
- "3333-3343:3333"
|
| 33 |
- "3433-3443:3433"
|
| 34 |
- "2080-2090:2080"
|
| 35 |
- "9010-9011:9010" # Expose JMX port |
| 36 |
# Keep 7443 internal if you prefer, or expose it similarly
|
| 37 |
expose:
|
| 38 |
- "7443" # Not exposed to host, only to the internal network |
| 39 |
extra_hosts:
|
| 40 |
- "host.docker.internal:host-gateway"
|
| 41 |
networks:
|
| 42 |
- app-net
|
| 43 |
depends_on:
|
| 44 |
locator:
|
| 45 |
condition: service_healthy |
| 46 |
|
| 47 |
networks:
|
| 48 |
app-net:
|
| 49 |
driver: bridge |