Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docker-compose] setup an environment variable for configuration directory path as opposed to relative paths #28

Open
shantanoo-desai opened this issue Mar 22, 2023 · 1 comment
Assignees
Labels
docker-compose All activities related to docker compose files / templates enhancement New feature or request

Comments

@shantanoo-desai
Copy link
Owner

Description

A known caveat for using relative paths in the docker-compose.<service>.yml.j2 templates e.g. ./conf/<service>, if the host where komponist generate the dedicated files MAY have a different absolute path when resolved via docker compose config which can cause incompatibility issues when used for remote deployment strategies.

In a nutshell, the generated docker-compose.yml file will have absolute paths to configuration directories that MAY not exist on remote machines.

@shantanoo-desai shantanoo-desai added enhancement New feature or request docker-compose All activities related to docker compose files / templates labels Mar 22, 2023
@shantanoo-desai shantanoo-desai self-assigned this Jul 7, 2023
@shantanoo-desai
Copy link
Owner Author

For a given deploy_dir set to ./deploy, upon executing the generate_stack.yml on an inventory list of hosts the deploy directory is generated in the home directory of the remote ansible user. Assuming the default working directory is based on the ansible fact of ansible_user_dir using a . in all Docker Compose will work as the generated docker-compose.yml will resolve the path w.r.t. to the User directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker-compose All activities related to docker compose files / templates enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant