Commit 6c01c335 authored by abdullh.alsoleman's avatar abdullh.alsoleman

HAproxy

parent 876d1e53
FROM openjdk:11-jre-slim
COPY server2.jar /app/server2.jar
CMD ["java", "-jar", "/app/server2.jar"]
\ No newline at end of file
version: '3'
services:
haproxy:
image: haproxy:latest
volumes:
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
networks:
- my_network
ports:
- "80:7070"
server1:
build:
context: .
dockerfile: server1/Dockerfile
networks:
- my_network
server2:
build:
context: .
dockerfile: server2/Dockerfile
networks:
- my_network
networks:
my_network:
global
log stdout format raw local0
defaults
log global
mode http
timeout connect 5000ms
timeout client 50000ms
timeout server 50000ms
frontend http-in
bind *:7070
default_backend servers
backend servers
balance roundrobin
server server1 server1:8080 check
server server2 server2:9090 check
File added
File added
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment