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

Deploy command with subdirectory #17

Open
tiloio opened this issue Jun 7, 2019 · 2 comments · May be fixed by #38
Open

Deploy command with subdirectory #17

tiloio opened this issue Jun 7, 2019 · 2 comments · May be fixed by #38

Comments

@tiloio
Copy link

tiloio commented Jun 7, 2019

Why do I can't choose a subdirectory for me application root?
It is only possible to have another branch.

But if you have a frontend and a backend you want both in one repository and not in two branches.

@githubsaturn
Copy link
Collaborator

You can use custom captain-definition paths.

  • Create a frontend and a backend app on CapRover
  • Go to the web dashboard and under the deployment tab (at the bottom) change captain-definition path to frontend-captain-definition for frontend app, and backend-captain-definition for backend app.
  • Create these two captain-definition file with custom dockerfile and have their path corrected.

Now you can deploy your source to each app and the correct.


Another approach is to have one captain-definition file in each directory (frontend and backend). Make no custom change to captain-definition and use the custom tarfile option and create the tar file of your subdirectory yourself, example:
https://caprover.com/docs/recipe-deploy-create-react-app.html

@tiloio
Copy link
Author

tiloio commented Jun 11, 2019

I think both approaches are not very convenient.

If I want to deploy more than two apps in a repo fast, I have to use the tar file option, which is manually very slow and annoying.
A proper CLI would be great for that.
Otherwise I would always write a shell script which does that for me...

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

Successfully merging a pull request may close this issue.

2 participants