Project Manager.

Project Manager makes it easier to keep track of your micro-services by grouping together related services; stop/start/build and set dependencies.

Article image for: Project Manager

Setting Config Options.

Introduction
Getting Started
Projects
Working with Services
Setting Config Options
Scripting Setup

Github Print

Changing Configuration Options

spm allows configuration directives to be changed from the command line (or you can edit the yaml files as needed). Run spm config to get a list of what you can change. Type completion is provided making it easy to select the options. At the time of writing the options are:

$ spm config
 Q  Select the option to change 
  [docker:name              ] Set the docker compose project name
  [docker:network           ] Set the docker shared network name
  [git:remote               ] Set the remote repository for the project/library/service
  [service:container:name   ] Change the name of the services main container (used for detection)
  [service:dependency:add   ] Add a dependency to the service
  [service:dependency:remove] Remove a dependency from the service
  [service:rename           ] Rename an existing services alias
  [template:add             ] Change a project template source (specify as type:name:source)
  [template:remove          ] Remove a project template

Once an option is selected, you will be prompted for the service to apply changes to. Then you will either be prompted for further information or enter the value. Take care to read what is expected. To cancel at any point hit: Ctrl+C

Setting Remote Repositories

By default when using project:create, libraries:create or services:create a git repository is started, but no remote is set. You can set this after the fact by using:

spm config git:remote <project_name> <repo>

Several other config options can be changed using the config command:

  • docker:name
  • docker:network
  • git:remote
  • service:container:name
  • service:dependency:add
  • service:dependency:remove
  • template:add
  • template:remove

If the option is not provided it will be prompted for; similarly if the project name is not specified, the current list of projects will be presented.

Note: when changing the remote repository, only a remote named origin will be modified. If you used a different name, you must manually change the remote and update the project config file yourself.