Skip to content

Commit

Permalink
another way
Browse files Browse the repository at this point in the history
  • Loading branch information
XGFan committed Dec 28, 2015
1 parent 7fd20bc commit 8b462f6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,12 @@ FROM haproxy:1.5

ENV REMORT_SERVER_ADDR=do.xulog.com
ENV REMOTE_PORT=8888
ENV RELAY_PORT=8000
ENV RELAY_PORT=9999

EXPOSE $RELAY_PORT

COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg

RUN echo "frontend RELAY \n bind *:$RELAY_PORT \n default_backend REMOTE_SERVER" >> /usr/local/etc/haproxy/haproxy.cfg

RUN echo "backend REMOTE_SERVER \n server server1 $REMORT_SERVER_ADDR:$REMOTE_PORT maxconn 20480" >> /usr/local/etc/haproxy/haproxy.cfg
9 changes: 0 additions & 9 deletions haproxy.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,3 @@ defaults
timeout connect 1000
timeout client 15000
timeout server 15000

frontend RELAY
bind *:$RELAY_PORT
default_backend REMOTE_SERVER



backend REMOTE_SERVER
server server1 $REMORT_SERVER_ADDR:$REMOTE_PORT maxconn 20480

0 comments on commit 8b462f6

Please sign in to comment.