-
Notifications
You must be signed in to change notification settings - Fork 824
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
[Deployment Issue] 'Captain-definition file does not exist' after updating repo structure #2068
Comments
Try this one, does it work?
|
Hmmm, that seemd to solved it. Why does it matter if I use I'm also getting a second error, Following some stackoverflow threads, it seemed like the easiest solution was to have my dockerfile at the solution level. I moved it there so my file structure looks like:
I then just updated my captain definition to:
which causes the error. new docker file just for reference:
Is there anyway to have a docker file in the parent directory or do I instead need to change my docker file to work from within the API directory (hopefully possible)? EDIT: EDIT 2:
Include everything in github workflow:
I obviously also had to update my default captain-definition path for my caprover app. Final question though is, is this the best way to do this? I'm eventually going to have 3 captain definitions and docker files in my solution directory, which, for lack of a better phrase, is a bit ugly IMO. Is there a better way to set this up while still having all projects in the solution and repo? EDIT 3: |
Yes, but the content of the tar file is a bit different. You want your captain definition to be at the root level of your tar file, not deep in a directory.
If you want to share dockerfiles / captain-definition across multiple apps (API and Business), that's the best way to do it.
This is the container port, not the host port.
|
Ahh, that all makes sense. I appreciate you taking the time to explain it all! |
IMPORTANT: Please avoid posting issues that are not specific to CapRover. Issues and questions related to Docker will get closed.
What is the problem?
Previously my repo only had a single .net core project in it and structure looked like this
The deploy for it worked and all was ok. But, In order to improve the app structure, I split it out into multiple projects like so:
The plan being that each project with a captain-definition will get its own caprover app. I use github actions and thought I would be able to just update the path to point to the new apps directory and life would be good but its not working.
Previous action (works)
New action (works but causes
Captain Definition file does not exist
in caprover)Note: I even tried specifying the captain-definition file like so:
the github action still succeeds but same error in caprover. I tried the advice from this question and ran
git archive --format tar --output ./test.tar refactorRepo
. This gave me a tar folder with the correct file structure, i.e.I've also double checked to make sure that the captain-definition is in fact pushed to my branch.
If applicable, content of
captain-definition
file:my docker file is pretty simple as well
(old)
updated (only changed the .dll name)
Steps to reproduce the problem:
Not entirely sure. Maybe its just an issue with a nested folder structure?
Output of the following command on your server:
The text was updated successfully, but these errors were encountered: