meteordigital-oceanmup

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: '@'
    }
  }
};

Solution

  • 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.