Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ mup init

Open the config, and make the following adjustments:

Make sure to add to the plugins section:
- `plugins: ['mup-docker-deploy']`

For each server:
- host - Usually is the IP Address of the server
- server authentication - You can use a password or set pem to the path to a private key. If neither are set, it uses ssh-agent
Expand All @@ -31,6 +34,11 @@ In the `app` section:
- path: Path to the app, relative to the config.
- type: Set to `docker-image` to let mup know that this plugin will manage the app

For deploying from a docker repository:

- type: Set to `remote-image` to let mup know that this plugin will manage the app
- image: The name of your image with a tag, ex `mycompany/webapp:v3.1.0`

Third, setup the server. Mup will install everything needed to run the app. Run:

```bash
Expand Down
19 changes: 18 additions & 1 deletion src/command-handlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,32 @@ export function reconfig(api, nodemiral) {

env.PORT = exposedPort;

const hostVars = {};
Object.keys(config.servers).forEach(key => {
if (config.servers[key].env) {
hostVars[servers[key].host] = { env: config.servers[key].env };
}
if (config.servers[key].settings) {
const settings = JSON.stringify(api.getSettingsFromPath(
config.servers[key].settings));
if (hostVars[servers[key].host]) {
hostVars[servers[key].host].env.METEOR_SETTINGS = settings;
} else {
hostVars[servers[key].host] = { env: { METEOR_SETTINGS: settings } };
}
}
});

list.copy('Sending Environment Variables', {
src: api.resolvePath(__dirname, 'assets/env.list'),
dest: `/opt/${config.name}/config/env.list`,
hostVars,
vars: {
env: env || {},
appName: config.name,
},
});

list.copy('Sending Start Script', {
src: api.resolvePath(__dirname, 'assets/start.sh'),
dest: `/opt/${config.name}/config/start.sh`,
Expand Down