https://github.com/kosmtik/kosmtik-deploy
Deploy your Kosmtik project on a remote server.
https://github.com/kosmtik/kosmtik-deploy
Last synced: 8 months ago
JSON representation
Deploy your Kosmtik project on a remote server.
- Host: GitHub
- URL: https://github.com/kosmtik/kosmtik-deploy
- Owner: kosmtik
- Created: 2014-11-09T16:34:47.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-09-12T18:21:13.000Z (almost 6 years ago)
- Last Synced: 2025-01-21T19:01:49.666Z (over 1 year ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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:
```javascript
{
"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](https://github.com/mscdex/ssh2), 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](https://github.com/kosmtik/kosmtik/issues)