diff --git a/examples/cluster-haproxy/docker-compose.yml b/examples/cluster-haproxy/docker-compose.yml index fe5aa4f96b..5a23d496b1 100644 --- a/examples/cluster-haproxy/docker-compose.yml +++ b/examples/cluster-haproxy/docker-compose.yml @@ -1,51 +1,53 @@ +services: + haproxy: + image: haproxy:1.7-alpine + volumes: + - ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro + links: + - server-john + - server-paul + - server-george + - server-ringo + ports: + - "3000:80" -haproxy: - build: ./haproxy - links: - - server-john - - server-paul - - server-george - - server-ringo - ports: - - "3000:80" + server-john: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=John -server-john: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=John + server-paul: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=Paul -server-paul: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=Paul + server-george: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=George -server-george: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=George + server-ringo: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=Ringo -server-ringo: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=Ringo - -redis: - image: redis:alpine - expose: - - "6379" + redis: + image: redis:alpine + expose: + - "6379" diff --git a/examples/cluster-haproxy/haproxy/haproxy.cfg b/examples/cluster-haproxy/haproxy.cfg similarity index 100% rename from examples/cluster-haproxy/haproxy/haproxy.cfg rename to examples/cluster-haproxy/haproxy.cfg diff --git a/examples/cluster-haproxy/haproxy/Dockerfile b/examples/cluster-haproxy/haproxy/Dockerfile deleted file mode 100644 index 3758e18d24..0000000000 --- a/examples/cluster-haproxy/haproxy/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM haproxy:1.7-alpine -COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg diff --git a/examples/cluster-httpd/docker-compose.yml b/examples/cluster-httpd/docker-compose.yml index ad6e6f004a..232281ffa2 100644 --- a/examples/cluster-httpd/docker-compose.yml +++ b/examples/cluster-httpd/docker-compose.yml @@ -1,51 +1,53 @@ +services: + httpd: + image: httpd:2.4-alpine + volumes: + - ./httpd.conf:/usr/local/apache2/conf/httpd.conf:ro + links: + - server-john + - server-paul + - server-george + - server-ringo + ports: + - "3000:80" -httpd: - build: ./httpd - links: - - server-john - - server-paul - - server-george - - server-ringo - ports: - - "3000:80" + server-john: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=John -server-john: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=John + server-paul: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=Paul -server-paul: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=Paul + server-george: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=George -server-george: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=George + server-ringo: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=Ringo -server-ringo: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=Ringo - -redis: - image: redis:alpine - expose: - - "6379" + redis: + image: redis:6 + expose: + - "6379" diff --git a/examples/cluster-httpd/httpd/httpd.conf b/examples/cluster-httpd/httpd.conf similarity index 100% rename from examples/cluster-httpd/httpd/httpd.conf rename to examples/cluster-httpd/httpd.conf diff --git a/examples/cluster-httpd/httpd/Dockerfile b/examples/cluster-httpd/httpd/Dockerfile deleted file mode 100644 index 10fef8f3e2..0000000000 --- a/examples/cluster-httpd/httpd/Dockerfile +++ /dev/null @@ -1,2 +0,0 @@ -FROM httpd:2.4-alpine -COPY ./httpd.conf /usr/local/apache2/conf/httpd.conf diff --git a/examples/cluster-httpd/server/Dockerfile b/examples/cluster-httpd/server/Dockerfile index ca39caa521..caccfba307 100644 --- a/examples/cluster-httpd/server/Dockerfile +++ b/examples/cluster-httpd/server/Dockerfile @@ -1,4 +1,4 @@ -FROM mhart/alpine-node:6 +FROM node:14-alpine # Create app directory RUN mkdir -p /usr/src/app diff --git a/examples/cluster-nginx/docker-compose.yml b/examples/cluster-nginx/docker-compose.yml index e44ca60bad..810c3b6892 100644 --- a/examples/cluster-nginx/docker-compose.yml +++ b/examples/cluster-nginx/docker-compose.yml @@ -1,58 +1,58 @@ +services: + nginx: + image: nginx:alpine + volumes: + - ./nginx.conf:/etc/nginx/nginx.conf:ro + links: + - server-john + - server-paul + - server-george + - server-ringo + ports: + - "3000:80" -nginx: - image: nginx:alpine - volumes: - - ./nginx.conf:/etc/nginx/nginx.conf:ro - links: - - server-john - - server-paul - - server-george - - server-ringo - ports: - - "3000:80" + server-john: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=John -server-john: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=John + server-paul: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=Paul -server-paul: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=Paul + server-george: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=George -server-george: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=George + server-ringo: + build: ./server + links: + - redis + expose: + - "3000" + environment: + - NAME=Ringo -server-ringo: - build: ./server - links: - - redis - expose: - - "3000" - environment: - - NAME=Ringo + client: + build: ./client + links: + - nginx -client: - build: ./client - links: - - nginx - -redis: - image: redis:alpine - expose: - - "6379" + redis: + image: redis:6 + expose: + - "6379"