mirror of
https://github.com/containers/podman-compose.git
synced 2025-01-23 14:28:46 +01:00
#35: test for multiple -f
This commit is contained in:
parent
f008986633
commit
a512c0cb82
19
tests/multicompose/README.md
Normal file
19
tests/multicompose/README.md
Normal file
@ -0,0 +1,19 @@
|
||||
# Multiple compose files
|
||||
|
||||
to make sure we get results similar to
|
||||
|
||||
```
|
||||
docker-compose -f d1/docker-compose.yml -f d2/docker-compose.yml up -d
|
||||
docker exec -ti d1_web1_1 sh -c 'set'
|
||||
docker exec -ti d1_web2_1 sh -c 'set'
|
||||
curl http://${d1_web1_1}:8001/index.txt
|
||||
curl http://${d1_web1_1}:8002/index.txt
|
||||
```
|
||||
|
||||
we need to verify
|
||||
|
||||
- project base directory and prject name is `d1`
|
||||
- `var12='d1/12.env'` which means `enf_file` was appened not replaced (which means that we normalize to array before merge)
|
||||
- `var2='d1/2.env'` which means that paths inside `d2/docker-compose.yml` directory are relative to `d1`
|
||||
|
||||
|
1
tests/multicompose/d1/1.env
Normal file
1
tests/multicompose/d1/1.env
Normal file
@ -0,0 +1 @@
|
||||
var1=d1/1.env
|
1
tests/multicompose/d1/12.env
Normal file
1
tests/multicompose/d1/12.env
Normal file
@ -0,0 +1 @@
|
||||
var12=d1/12.env
|
1
tests/multicompose/d1/2.env
Normal file
1
tests/multicompose/d1/2.env
Normal file
@ -0,0 +1 @@
|
||||
var2=d1/2.env
|
9
tests/multicompose/d1/docker-compose.yml
Normal file
9
tests/multicompose/d1/docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
||||
version: '3'
|
||||
services:
|
||||
web1:
|
||||
image: busybox
|
||||
command: busybox httpd -h /var/www/html/ -f -p 8001
|
||||
volumes:
|
||||
- ./1.env:/var/www/html/index.txt
|
||||
env_file: ./1.env
|
||||
|
1
tests/multicompose/d2/12.env
Normal file
1
tests/multicompose/d2/12.env
Normal file
@ -0,0 +1 @@
|
||||
var12=d2/12.env
|
1
tests/multicompose/d2/2.env
Normal file
1
tests/multicompose/d2/2.env
Normal file
@ -0,0 +1 @@
|
||||
var2=d2/2.env
|
12
tests/multicompose/d2/docker-compose.yml
Normal file
12
tests/multicompose/d2/docker-compose.yml
Normal file
@ -0,0 +1,12 @@
|
||||
version: '3'
|
||||
services:
|
||||
web1:
|
||||
env_file: ./12.env
|
||||
|
||||
web2:
|
||||
image: busybox
|
||||
command: busybox httpd -h /var/www/html/ -f -p 8002
|
||||
volumes:
|
||||
- ./2.env:/var/www/html/index.txt
|
||||
env_file: ./2.env
|
||||
|
Loading…
Reference in New Issue
Block a user