Compare commits

...

3 Commits

Author SHA1 Message Date
82659b67e9 ??? 2022-11-17 11:38:22 +01:00
c7d69b2af3 chgt back-ticks dans hosts et <<- par << pour le here-doc 2022-11-17 08:48:01 +01:00
9ec91834aa typo 2022-11-17 00:50:40 +01:00

View File

@ -72,10 +72,13 @@ Vagrant.configure("2") do |config|
bash getdocker.sh
gpasswd -a vagrant docker
fi
mkdir -p docker/traefik && cd docker/traefiki
mkdir www
echo "my.nginx" > www/index.html
cat > docker-compose.yml <<-EOT
mkdir -p docker/traefik && cd docker/traefik
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
version: '3'
services:
@ -96,9 +99,16 @@ services:
# A container that exposes an API to show its IP address
image: nginx:1.23-alpine
volumes:
-v ./www:/usr/share/nginx/html:ro
- ./nginx:/usr/share/nginx/html:ro
labels:
- "traefik.http.routers.nginx.rule=Host(`my.nginx`)"
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