Nothing Goes From Idea To Container Faster

Resource Management

Apply custom files to a project generation session.

This features allows you to use one or more of your own project files instead of a corresponding file created during project generation.

For example, by default, if creating a project requiring the application be containerized using Docker, a default Dockerfile will be generated. This Dockerfile is tech stack specific so it will work as expected.

If, however, you would prefer to use your own Dockerfile, you can publish the Dockerfile as a resource and refernece it within your Project-as-Code YAML file by observing the following steps:

  1. Publish the Resource
  2. Publishng a resource makes to realMethods makes it available either to only you (private) or to others (public). Once a resource is published, it can be either promoted to public or demoted back to private. When demoting, care should be taken considering others could be using the resource as part of the project generation.

    For example to publish a Docker file to be reused in a project generation session:

    realmethods_cli resource_publish ./some_path/Dockerfile myDockerFile DOCKERFILE
    Note: In all cases, when using a resource to replace an otherwise generated file, it is important the name of the file you are registering exactly matches the one expected to be replaced.

  3. Using Resources
  4. Within a Project-as-Code YAML file, you can declare usage of one or more resources any within the resources section.

    For example:
                available:          myDockerFile myK8AccountCredentials 

    Note: In certain cases, it may be necessary to replace multiple files during project generation. In that case, you would still publish each as a uniquely named resource and simply apply each name with a space between the names

Close Menu