Deployment error using meteor up

Hi,
I am trying to update my meteor app to 2.12 or 2.13 and I can’t deploy it.
I am trying to deploy it using meteor up, this is my config:

let targetServer = process.env.TARGET_SERVER;

module.exports = {

  servers: {
    one: {
      host: targetServer,
      username: 'my_username',
      pem: './my_ssh_id_rsa'
    }
  },

  proxy: {
    domains: `${targetServer}`,
    ssl: {
      letsEncryptEmail: 'administrator@app',
      forceSSL: true
    }
  },

  app: {
    name: 'my-app',
    path: '../',
    servers: {
      one: {}
    },
    buildOptions: {
      serverOnly: true,
    },
    env: {
      ROOT_URL: `https://${targetServer}`,
      MONGO_URL: 'mongodb://localhost/meteor',
      AOT: 1,
      MONTI_APP_ID: process.env.MONTI_APP_ID,
      MONTI_APP_SECRET: process.env.MONTI_APP_SECRET
    },
    docker: {
      image: 'zcloudws/meteor-node-runtime:2.12',
      buildInstructions: [
        'RUN meteor npm install --alow-superuser'
      ],
    },
    deployCheckWaitTime: 480
  },

  mongo: {
    version: '6.0.3',
    oplog: true,
    port: 27017,
    servers: {
      one: {},
    },
  },
};

When I run mup deploy I get an error

**Verifying Deployment: FAILED**
curl: (7) Failed to connect to 172.17.0.4 port 3000 after 1 ms: Connection refused
	curl: (7) Failed to connect to 172.17.0.4 port 3000 after 0 ms: Connection refused
	curl: (7) Failed to connect to 172.17.0.4 port 3000 after 0 ms: Connection refused


**Error: Cannot find module '@meteorjs/reify/lib/runtime'**

**Require stack:**

**- /home/zcloud/app/programs/server/runtime.js**

**- /home/zcloud/app/main.js**

**at Function.Module._resolveFilename (internal/modules/cjs/loader.js:931:15)**

**at Function.Module._load (internal/modules/cjs/loader.js:774:27)**

**at Module.require (internal/modules/cjs/loader.js:1003:19)**

**at require (internal/modules/cjs/helpers.js:107:18)**

**at enable (/home/zcloud/app/programs/server/runtime.js:34:5)**

**at Object.<anonymous> (/home/zcloud/app/main.js:4:40)**

**at Module._compile (internal/modules/cjs/loader.js:1114:14)**

**at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)**

**at Module.load (internal/modules/cjs/loader.js:979:32)**

**at Function.Module._load (internal/modules/cjs/loader.js:819:12) {**

**code: 'MODULE_NOT_FOUND',**

**requireStack: [**

**'/home/zcloud/app/programs/server/runtime.js',**

**'/home/zcloud/app/main.js'**

**]**

Before zcloudws/meteor-node-runtime:2.12 I used to run abernix and I had no errors whatsoever, so I don’t understand why is there a problem when running it with a new docker image.

I saw online that you need to run meteor npm install on the server before mup deploy… so I tried, this is my drone.yml (I am using drone as cicd)

kind: pipeline
type: docker
name: default

concurrency:
  limit: 1

steps:
  - name: build
    image: my_custom_image/meteord:2.12-pipeline
    commands:
      - meteor npm install --alow-superuser
    volumes:
      - name: docker_socket
        path: /var/run/docker.sock

  - name: deploy-staging
    image: my_custom_image/meteord:2.12-pipeline
    commands:
      - chmod 400 .deploy/my.app
      # Add fingerprint
      - cd ~ && mkdir .ssh && chmod 700 .ssh && cd .ssh && touch known_hosts
      - ssh-keyscan -H my.app >> ~/.ssh/known_hosts
      - ssh-keyscan -H my.app >> ~/.ssh/known_hosts
      - cd /drone/src
      # Disable payments and enable maintenance flags
      - sh enable-maintenance.sh stg.medic.chat
      # Deploy and sync db
      - meteor npm install --alow-superuser
      - sh deploy-staging.sh
      - sh sync-prod-with-staging-db.sh
      - sh disable-maintenance.sh stg.my.app
      
    when:
      event: push # Execute this step only when somebody pushes to master

trigger:
  branch:
    - master
    - meteor-2.13
  event:
    - push
    - promote

volumes:
  - name: docker_socket
    host:
      path: /var/run/docker.sock

As you can see, I run meteor npm install before deployment (sh deploy-staging.sh) but I get almost the same error

Verifying Deployment
216 CONTAINER IP EMPTY
217 IP:
218 Container has no IP Address, likely from the app crashing.
219 CONTAINER IP EMPTY

For 2.12 you can use zodern/meteor:latest
2.13 needs a different image, see here: Migrating to Meteor 2.13 | Meteor Guide

1 Like

I can’t verify the security of the image, but this one does work for 2.13.3: momenysr/meteor:root

Our images should also be compatible with Meteor Up.

https://hub.docker.com/repository/docker/zcloudws/meteor-node-runtime/general

I ended up using zodern:meteor:root

1 Like

Is the zcloudws/meteor-node-runtime image compatible with buildInstructions ?

buildInstructions: [
                'USER root',
                'RUN apt-get update && apt-get install -y imagemagick',
                'USER zcloud'
            ],

I don’t think we consider it but feel free to open a PR :wink: