My first basic loadBalancer
This commit is contained in:
43
docker-compose.yml
Normal file
43
docker-compose.yml
Normal file
@@ -0,0 +1,43 @@
|
||||
version: '3.9'
|
||||
services:
|
||||
app-1:
|
||||
image: node-app:v1
|
||||
ports:
|
||||
- "3001:3000"
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
- INSTANCE_NAME=app-1
|
||||
|
||||
app-2:
|
||||
image: node-app:v1
|
||||
ports:
|
||||
- "3002:3000"
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
- INSTANCE_NAME=app-2
|
||||
|
||||
app-3:
|
||||
image: node-app:v1
|
||||
ports:
|
||||
- "3003:3000"
|
||||
networks:
|
||||
- app-network
|
||||
environment:
|
||||
- INSTANCE_NAME=app-3
|
||||
|
||||
|
||||
nginx:
|
||||
image: nginx:alpine
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./files/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
networks:
|
||||
- app-network
|
||||
|
||||
|
||||
networks:
|
||||
app-network:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user