Using MUP returned a container error - meteor

When I used the following config deploying to digitalocean, I did a $ mup setup with no errors and then ran $ mup deploy and everything went well until it tried to prepare bundle...what am I missing here?
This is the error I'm getting with the following config when deploying...
module.exports = {
servers: {
one: {
host: 'xxx.xxx.xxx.xxx',
username: 'root',
pem: "~/.ssh/id_rsa"
}
},
app: {
name: 'hotel',
path: '../hotel',
// this is my local path to the application root
servers: {
one: {},
},
buildOptions: {
serverOnly: true,
},
env: {
ROOT_URL: 'http://xxx.xxx.xxx.xxx',
MONGO_URL: 'mongodb://localhost/meteor',
},
docker: {
image: 'abernix/meteord:base',
},
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
},
mongo: {
version: '3.4.1',
servers: {
one: {}
}
}
};

Related

Meteor app on digitalocean with https://app and https//www. Sometimes fails to serve https://app

Problem:
My app runs on digitalocean droplet with multiple domains:
proxy: {
domains: 'example.com,www.example.com',
ssl: {
letsEncryptEmail: '#'
}
}
Sometimes, for about half an hour the https://example.com fails to load completely but indirect links like https://example.com/about works fine.
Tried:
fiddling with nginx option:
nginxServerConfig: './nginx.conf',
Any attempts with it failed loading page completely
Mup.js file:
module.exports = {
servers: {
one: {}
},
app: {
deployCheckWaitTime: 300,
name: 'example',
path: '../',
buildOptions: {
serverOnly: true,
},
env: {
ROOT_URL: 'https://example.com',
MONGO_URL: 'mongodb://mongodb:27017/example',
},
docker: {
image: 'abernix/meteord:node-8.4.0-base',
args: ['--link=mongodb:mongodb'],
},
enableUploadProgressBar: true
},
proxy: {
domains: 'example.com,www.example.com',
ssl: {
letsEncryptEmail: '#'
}
}
};
Turns out, that problem lied in mailgun.
The mailgun DNS records didn't match v=spf1 include:eu.mailgun.org ~all thus those mails weren't authorized and whenever mail was sent through the system it was tripping domain provider to refresh it's DNS.
I solved this issue by setting up a permanent redirect for www through my domain settings.

Meteor Up deployment error

I am deploying meteor app using Meteor Up.
The development app is at the location /apps/proto/meteor/GatewayUI
and i have the .deploy folder which is inside the GatewayUI folder.
On giving the command "mup deploy", I get the following error
{ Error: spawn meteor ENOENT
at exports._errnoException (util.js:1018:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
code: 'ENOENT',
errno: 'ENOENT',
syscall: 'spawn meteor',
path: 'meteor', spawnargs:
[ 'build',
'--directory',
'/tmp/mup-meteor-981e8b09-055e-4ffe-a50a-d73d07c1ac5f',
'--architecture',
'os.linux.x86_64',
'--debug',
'--mobile-settings',
'/apps/proto/meteor/GatewayUI/settings.json' ] }
This error usually happens when meteor is not installed.
My mup.js is as follows:
module.exports = {
servers: {
one: {
// TODO: set host address, username, and authentication method
host: 'myhost',
username: 'myusername',
// pem: './path/to/pem'
password: 'mypassword'
// or neither for authenticate from ssh-agent
}
},
meteor: {
// TODO: change app name and path
name: 'GatewayUI',
path: '../../GatewayUI/',
servers: {
one: {},
},
buildOptions: {
debug: true,
executable: 'meteor',
},
env: {
// TODO: Change to your app's url
// If you are using ssl, it needs to start with https://
ROOT_URL: 'http://gatewayui.com',
MONGO_URL: 'mongodb://localhost/meteor',
},
// ssl: { // (optional)
// // Enables let's encrypt (optional)
// autogenerate: {
// email: 'email.address#domain.com',
// // comma seperated list of domains
// domains: 'website.com,www.website.com'
// }
// },
docker: {
// change to 'kadirahq/meteord' if your app is not using Meteor 1.4
image: 'abernix/meteord:base',
// imagePort: 80, // (default: 80, some images EXPOSE different ports)
},
// This is the maximum time in seconds it will wait
// for your app to start
// Add 30 seconds if the server has 512mb of ram
// And 30 more if you have binary npm dependencies.
deployCheckWaitTime: 60,
// Show progress bar while uploading bundle to server
// You might need to disable it on CI servers
enableUploadProgressBar: true
},
mongo: {
port: 27199,
version: '3.4.1',
servers: {
one: {}
}
}
};
A couple of things for this to not happen
1) make sure Meteor is installed. In my case, it was installed, however, the path was not set. It happened, because I forgot to add the path permanently
2) Docker, Mongo, Meteor should be installed in effect.
3) Every time, mup setup must precede mup deploy.

Meteor Up mup deploy fails - Error response from daemon

I have a Meteor application that I'm trying to deploy on a VPS. I am using Meteor Up to do this.
By following the instructions I have set up my mup.js file to look like this:
module.exports = {
servers: {
one: {
host: '41.185.27.69',
username: 'root',
// pem:
password: 'secret',
// or leave blank for authenticate from ssh-agent
opts: {
port: 22
}
}
},
meteor: {
name: 'HelderbergLink',
path: '../../HelderbergLink',
servers: {
one: {}
},
buildOptions: {
serverOnly: true,
},
env: {
ROOT_URL: 'http://41.185.27.69',
MONGO_URL: 'mongodb://127.0.0.1:27017/HelderbergLink'
},
dockerImage: 'abernix/meteord:base',
deployCheckWaitTime: 60
},
mongo: {
oplog: true,
port: 27017,
servers: {
one: {},
},
},
};
After this is set up I run the following command in my .deploy directory:
mup.cmd setup
Everything setups successfully here, but then when I need to run the next command:
mup.cmd deploy
It runs through most of the process but then gives me this error:
I'm not sure what to do to resolve this. Any help would be much appreciated!

Meteor Up Setup Error on DigitalOcean

I am trying to deploy a Meteor app onto a DigitalOcean droplet, via its IP address (I have no domain name). I am doing this kind of thing for the first time, and am having a lot of issues with it.
This is my droplet on Digital Ocean:
I created a MUP (Meteor Up) directory outside my Meteor app’s repo using mup init, and this is the mup.js file that I have:
module.exports = {
servers: {
one: {
host: 'http://162.243.57.207',
username: 'cs673f16',
pem: '/Users/gautambhat/.ssh/id_rsa'
// password:
// or leave blank for authenticate from ssh-agent
}
},
meteor: {
name: 'meetcute',
path: '/Users/gautambhat/Repos/CS673_team2',
servers: {
one: {}
},
buildOptions: {
serverOnly: true,
},
env: {
ROOT_URL: 'http://162.243.57.207',
PORT : 3000
//MONGO_URL: 'mongodb://localhost/meteor'
},
//dockerImage: 'kadirahq/meteord'
deployCheckWaitTime: 60
},
mongo: {
oplog: true,
port: 27017,
servers: {
one: {},
},
},
};
Also, I don't know my MONGO_URL, or where to find it, so I just commented it out. On running mup setup, I get the following error:
Started TaskList: Setup Docker
[http://162.243.57.207] - setup docker
Error getaddrinfo ENOTFOUND http://162.243.57.207 http://162.243.57.207:22
Can anyone point me in the right direction?
The error—as described in your original post—is as follows:
Started TaskList: Setup Docker
[http://162.243.57.207] - setup docker
Error getaddrinfo ENOTFOUND http://162.243.57.207 http://162.243.57.207:22
The error basically means it can’t find the host http://162.243.57.207. So let’s look at the `servers part of your configuration:
servers: {
one: {
host: 'http://162.243.57.207',
username: 'cs673f16',
pem: '/Users/gautambhat/.ssh/id_rsa'
// password:
// or leave blank for authenticate from ssh-agent
}
},
Your host setting is a URL when it should be a hostname or IP address; meaning host: 'http://162.243.57.207' should just be 162.243.57.207. So change that and try again:
servers: {
one: {
host: '162.243.57.207',
username: 'cs673f16',
pem: '/Users/gautambhat/.ssh/id_rsa'
// password:
// or leave blank for authenticate from ssh-agent
}
},

Grunt connect not living long enough to allow me to test it

When I try using Grunt to create a server for me it quickly shuts down and doesn't give me a change to go to my browser and test it.
This is my entire Grunt file:
module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.initConfig({
connect: {
serve: {
options: {
port: 8081,
base: '/',
hostname: '*',
debug: true
}
}
}
});
grunt.registerTask('default', ['connect']);
}
When I run it, it works without errors:
C:\Users\Imray\my-sandbox>grunt
Running "connect:keepalive" (connect) task
Started connect web server on http://0.0.0.0:8000
Running "connect:serve" (connect) task
Started connect web server on http://0.0.0.0:8081
You have the keepalive settings dedicated for this :
grunt.initConfig({
connect: {
serve: {
options: {
keepalive: true,
port: 8081,
base: '/',
hostname: '*',
debug: true
}
}
}
});

Resources