GithubHelp home page GithubHelp logo

Comments (5)

bibendi avatar bibendi commented on May 29, 2024 1

Hi
Thank you for the reporting!
I'll see this next week.

from dip.

bibendi avatar bibendi commented on May 29, 2024

@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.

stoutput avatar stoutput commented on May 29, 2024

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.

stoutput avatar stoutput commented on May 29, 2024

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.

bibendi avatar bibendi commented on May 29, 2024

Ok. I think I can close the issue.

from dip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.