Files
docker_yoba_task/docker-compose.yml
2024-10-18 01:07:46 +03:00

59 lines
1.0 KiB
YAML

version: "3"
services:
# ----------------------------------------------
ngx1-net1:
build:
context: .
args:
NET_NAME: net_1
CONTAINER_NAME: container_1
ports:
- "8080:80"
networks:
- net_1
- net_3
ngx2-net1:
build:
context: .
args:
NET_NAME: net_1
CONTAINER_NAME: container_2
networks:
- net_1
# ----------------------------------------------
ngx1-net2:
build:
context: .
args:
NET_NAME: net_2
CONTAINER_NAME: container_1
ports:
- "8081:80"
networks:
- net_2
- net_3
ngx2-net2:
build:
context: .
args:
NET_NAME: net_2
CONTAINER_NAME: container_2
networks:
- net_2
# ----------------------------------------------
visor:
image: ubuntu:latest
restart: on-failure
command: >
bash -c "apt update
&& apt install iproute2 vim curl nmap -y
&& sleep infinity"
networks:
- net_3
networks:
net_1:
net_2:
net_3: