Comments (5)
Hi
Thank you for the reporting!
I'll see this next week.
from dip.
@stoutput could you provide your main dip.yml? Do you have compose
section in it?
Also, please run any dip command with the DIP_ENV-debug
environment variable, and provide the output.
The problem is when the path to a compose config is relative then it is expanded to "main dip.yml dir" + relative path.
The quick workaround is to use absolute paths to compose configs, or you can try the special environment variable ${DIP_WORK_DIR_REL_PATH}
compose:
files:
- ${DIP_WORK_DIR_REL_PATH}/docker-compose.yml
- ${DIP_WORK_DIR_REL_PATH}/docker-compose.$COMPOSE_EXT.yml
from dip.
The main dip.yml does not have a compose section in it. It looks something like:
version: '7.0'
environment:
CYAN: '\033[1;96m'
RED: '\033[0;31m'
YELLOW: '\033[0;93m'
GREEN: '\e[0;32m'
NC: '\033[0m'
CERTS_PATH: $PWD/certs
DOCKER_CPUS: 6
DOCKER_RAM: 1536
DOCKER_SWAP: 6144
DOCKER_SETTINGS_PATH: "$HOME/Library/Group Containers/group.com.docker/settings.json"
NET_NAME: nginx-proxy
REPOS:
- [email protected]:org/repo.git
- [email protected]:org/repo-two.git
interaction:
...
provision:
...
Running DIP_ENV=debug dip up -d
in the subfolder with the dip.override.yml
, I get docker-compose --project-name Project up -d
as the final command. The project name is correct and derives from the dip.override.yml, but the files key doesn't work as you expected, since their paths are relative to the current folder.
Adding the ${DIP_WORK_DIR_REL_PATH}
as you suggested and re-running, the final command is now correctly built as docker-compose --file /Users/me/root-project/project/docker-compose.yml --file /Users/me/root-project/project/docker-compose.proxy.yml --project-name Project up -d
from dip.
I'm fine with whatever structure you think is best here, whether to keep paths relative to the main dip.yml or not. I can keep the ${DIP_WORK_DIR_REL_PATH}
workaround in the override file and that should be just fine going forward. Thanks!
from dip.
Ok. I think I can close the issue.
from dip.
Related Issues (20)
- dip provision fails if there is a space in the path name HOT 2
- Dip does not wrap an actual container command in quotes on Ubuntu HOT 4
- Since 7.1.2 `shell: false` commands with any argument fails with "undefined local variable or method `default_args' " HOT 2
- Docker compose v2 compat? HOT 8
- Question: Is there a way to use the 7+ version for non-ruby project? HOT 1
- question regarding description string HOT 1
- port forwardings in docker-compose.yml are not activated via dip HOT 2
- Can I use more than one provision or there have another way to run commands each by each? HOT 4
- `dip nginx` Default Image Change to `nginxproxy/nginx-proxy` HOT 1
- Doesn't work on MacOS Catalina HOT 3
- `docker-compose` is always used instead of `docker compose` HOT 2
- Latest version doesnt recognize the commands
- User Level Permissions by Default? HOT 1
- Feature request: DIP_ROOT_DIR env var
- Question: Is it possible to use Docker Compose profiles? HOT 3
- Make DIP_FILE relative path
- dip commands fails with psych error 'Tried to load unspecified class: Symbol (Psych::DisallowedClass)' HOT 4
- Feature request: Ability to remove environment HOT 1
- Current Docker host user UID special environment variable HOT 2
- replace nginx with traefik HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dip.