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

How do I add addition files beside compose.yml #80

Closed
trading-peter opened this issue Sep 13, 2024 · 4 comments
Closed

How do I add addition files beside compose.yml #80

trading-peter opened this issue Sep 13, 2024 · 4 comments

Comments

@trading-peter
Copy link

Hi,

I've been trying to deploy a simply project for the first time but I'm having trouble adding a additional file to the stack that gets mounted by one of the containers.

Context:
The project mounts as config.yml file into the container:

    volumes:
            - ./config.yml:/app/config.yml

I deploy the stack using a git repo which has two files in the root of the repo:

  • docker-compose.yml
  • config.yml

When I instruct komodo to deploy it clones the repo fine and I can see that the two files are in the repo folder as expect. That is the "config.yml" file is only a very brief moment in there. It gets overridden by a folder called config.yml which ofc causes the app to crash as it expects config.yml to be a text file and not a folder.

Is my stack config wrong? Do I need to flip some switches to make it work?

Thanks a lot for your time and work. Highly appreciated!

@mbecker20
Copy link
Owner

mbecker20 commented Sep 13, 2024

See this issue: #68, specifically this response

@trading-peter
Copy link
Author

Thanks for the response.

Yeah I reckon this is a hard problem to solve right.

Personally solved it now by using a komodo repo with the compose file and the config file in it.
And then I setup a stack with the "files on server" option to point it to the cloned komodo repo.
Using a producer I stop the stack, pull the repo and then restart the stack again via gitea webhook.

Works for me.

Only thing I would love to have is a way to execute a command before a pull. To reset the already cloned repo for example.

@mbecker20
Copy link
Owner

It already pulls with 'git pull --force', which will override local changes and removes any problems with conflicting history. This should be documented but also, you can see it in the Update log if you click on it.

Thanks for the pre pull idea, I think some users would appreciate to fix any edge cases from how they use Repo. I'll throw that in soon.

@trading-peter
Copy link
Author

Ok, for me it was erroring out because the config file had a not committed line break in the existing local repo.

Thanks for adding the pre-pull command !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants