Skip to content

Deploy command with subdirectory #17

Open

Description

@tiloio

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.

Activity

  1. githubsaturn commented on Jun 8, 2019

    @githubsaturn
    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

  2. tiloio commented on Jun 11, 2019

    @tiloio
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions