Skip to content

Deploy your Kosmtik project on a remote server.

Notifications You must be signed in to change notification settings

kosmtik/kosmtik-deploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Kosmtik-deploy

Deploy your Kosmtik project on a remote server. Only SSH supported for now.

Experimental, not suited for production use.

Install

While in your kosmtik root, type:

node index.js plugins --install kosmtik-deploy

Usage

Only command line for now. Eg.:

node index.js deploy ~/Code/maps/transilien/project.yml

Get details about the available options with:

node index.js deploy -h

All the options can also be set in your project config file (.mml/.yml), using the deploy key. For example:

{
    "protocol": "ssh",  // optional, as it's the default (and only one supported)
    "username": "foo",
    "password": "123456",
    "root": "xxx/yyyy/zzz",  // remote root where to scp your project
    "ignore": ['this/dir', 'this/file.txt']  // paths to be ignored, can be regex,
    "include": ['this/dir', 'this/file.txt']  // paths of files and dirs to be included (default to project root)
    "xml": "mapnik.xml"  // Name of the created Mapnik XML
}

If you are using public key based authentication, you can use one those option:

  • you are on a Unix system and your private key is ~/.ssh/id_rsa: do nothing, it will be automatic
  • add a privateKeyPath key with the path to your private key
  • add a privateKey key with your SSH private key content

SSH is managed under the hood by the ssh2 module, so you may have a look there to get more details about the available options (you can use all of those in your project.yml deploy key).

Also, remember that you can use your local config file to manage project config information your don't want to visible in the versionned project.yml/.mml file.

Here is an example of a localconfig.js file:

exports.LocalConfig = function (localizer, project) {
    project.mml.compareUrl = 'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png';
    localizer.where('Layer').if({'Datasource.type': 'postgis'}).then({
        'Datasource.dbname': 'idf',
        'Datasource.password': '',
        'Datasource.user': 'ybon',
        'Datasource.host': ''
    });
    project.mml.deploy = {
        host: 'xxxx.kimsufi.com',
        root: 'maps/transilien'
    };
};

Issues and feature requests

Please report any issue or feature request on the main kosmtik repository

About

Deploy your Kosmtik project on a remote server.

Resources

Stars

Watchers

Forks

Packages

No packages published