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

Add Command: Run Docker-Compose #6

Open
8 of 9 tasks
6za opened this issue Feb 9, 2023 · 2 comments
Open
8 of 9 tasks

Add Command: Run Docker-Compose #6

6za opened this issue Feb 9, 2023 · 2 comments
Assignees

Comments

@6za
Copy link
Contributor

6za commented Feb 9, 2023

docker-compose-runner

  • A container that mounts secret as an .env file or vars for the container host. (mount-vars)

Create a mechanism to list the variables to be exported.

  • Provide a repository to be cloned. (Address with HTTPS - repoAddress)

token may be provided for private repos

  • Provide a path for the docker-compose file relative to execution path(composeFile)
  • Update CRD with details, with execution details (resource)
  • Execution path to go, before running the compose. (executionPath)
  • Host-ip for the host that would run the compose-file

should alias to be supported and use a CRD to check its value and map its hostIp.

hostIp: 192.168.1.2
composeFile: docker-compose-app.yaml
executionPath: /my/app
repoAddress: https://github.com/6zacode-toolbox/docker-agent.git
mountVars:
 - ENV-1
 - ENV-2

resource: 
  api:
  namespace:
  name: 
  resource: 

The CRD used to trigger this pod/container will provide all details needed, so for that we need to update docker-agent with a CLI command to integrate to it, it would:

  • Loads configs from CRD Spec and save to a json file
  • Save to CRD Status from a json file
  • Use the json to drive the execution of the docker-compose execution
@6za
Copy link
Contributor Author

6za commented Feb 9, 2023

  • Design Decision: A initial is a version it will be a golang app that will have shell to docker-compose action.

Later, it could be converted to a native golang app using compose libs, if it provides value..

@6za
Copy link
Contributor Author

6za commented Feb 15, 2023

After some PRs most of the behavior is done, just missing how to load envs parameters.

@6za 6za self-assigned this Feb 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant