mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-26 09:53:23 +01:00
60 lines
1.7 KiB
YAML
60 lines
1.7 KiB
YAML
|
version: "3"
|
||
|
networks:
|
||
|
shared-network:
|
||
|
driver: bridge
|
||
|
ipam:
|
||
|
config:
|
||
|
- subnet: "172.19.1.0/24"
|
||
|
internal-network:
|
||
|
driver: bridge
|
||
|
ipam:
|
||
|
config:
|
||
|
- subnet: "172.19.2.0/24"
|
||
|
|
||
|
services:
|
||
|
web1:
|
||
|
image: busybox
|
||
|
hostname: web1
|
||
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
||
|
working_dir: /var/www/html
|
||
|
networks:
|
||
|
shared-network:
|
||
|
ipv4_address: "172.19.1.10"
|
||
|
internal-network:
|
||
|
ipv4_address: "172.19.2.10"
|
||
|
volumes:
|
||
|
- ./test1.txt:/var/www/html/index.txt:ro,z
|
||
|
web2:
|
||
|
image: busybox
|
||
|
hostname: web2
|
||
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
||
|
working_dir: /var/www/html
|
||
|
mac_address: "02:01:01:00:02:02"
|
||
|
networks:
|
||
|
internal-network:
|
||
|
ipv4_address: "172.19.2.11"
|
||
|
volumes:
|
||
|
- ./test2.txt:/var/www/html/index.txt:ro,z
|
||
|
|
||
|
web3:
|
||
|
image: busybox
|
||
|
hostname: web2
|
||
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
||
|
working_dir: /var/www/html
|
||
|
networks:
|
||
|
internal-network:
|
||
|
volumes:
|
||
|
- ./test3.txt:/var/www/html/index.txt:ro,z
|
||
|
|
||
|
web4:
|
||
|
image: busybox
|
||
|
hostname: web2
|
||
|
command: ["/bin/busybox", "httpd", "-f", "-h", "/var/www/html", "-p", "8001"]
|
||
|
working_dir: /var/www/html
|
||
|
networks:
|
||
|
internal-network:
|
||
|
shared-network:
|
||
|
ipv4_address: "172.19.1.13"
|
||
|
volumes:
|
||
|
- ./test4.txt:/var/www/html/index.txt:ro,z
|