Compare commits

...

2 Commits

Author SHA1 Message Date
0436310086 modif spour substitution des parametres 2022-11-17 13:56:43 +01:00
82659b67e9 ??? 2022-11-17 11:38:22 +01:00

View File

@ -73,10 +73,12 @@ Vagrant.configure("2") do |config|
gpasswd -a vagrant docker
fi
mkdir -p docker/traefik && cd docker/traefik
mkdir www
echo "my.nginx" > www/index.html
mkdir nginx
echo "my.nginx" > nginx/index.html
mkdir nginx2
echo "my.nginx2" > nginx2/index.html
#cat > docker-compose.yml <<-EOT
cat > docker-compose.yml <<EOT
cat > docker-compose.yml <<'EOT'
version: '3'
services:
@ -97,10 +99,17 @@ services:
# A container that exposes an API to show its IP address
image: nginx:1.23-alpine
volumes:
- ./www:/usr/share/nginx/html:ro
- ./nginx:/usr/share/nginx/html:ro
labels:
- "traefik.http.routers.nginx.rule=Host(`my.nginx`)"
EOT
nginx2:
# A container that exposes an API to show its IP address
image: nginx:1.23-alpine
volumes:
- ./nginx2:/usr/share/nginx/html:ro
labels:
- "traefik.http.routers.nginx2.rule=Host(`my.nginx2`)"
'EOT'
docker compose up -d
ip -br a
SHELL