Mup Troubleshooting

This is a cheatsheet on troubleshooting Mup, the Meteor deploy tool.

Since 2015, Mup started using Docker for deployments.

Docker Commands

command use
sudo docker ps show running containers

Other Useful Commands

command use
htop Show resource use – sortable

Server Directories & File Locations

Applications are stored under /opt.

Project Scripts & Config Files

These are the key scripts used by the Mup project: Check if deployment was successful Installs Docker if it isn't already installed Create /opt/meteor and subdirs cd /opt/<AppName>; config/ sudo docker rm -f <AppName>; docker rm -f <AppName>-frontend

Server Commands Used by Scripts

Here’s an example

function command
start app /opt/<appName>/config/
show logs docker logs –tail=50 /opt/

Docker Containers

Runtime Name Docker Image
mongodb mongo:latest
lt;appNamegt; abernix/meteord:base
lt;appNamegt;-frontend abernix/meteord:base

Startup Script

Here’s an example startup script from an app called AppName:



# Remove previous version of the app, if exists
docker rm -f $APPNAME

# Remove frontend container if exists
docker rm -f $APPNAME-frontend

# We don't need to fail the deployment because of a docker hub downtime
set +e
docker pull abernix/meteord:base
set -e

docker run \
  -d \
  --restart=always \
  --publish=$PORT:80 \
  --volume=$BUNDLE_PATH:/bundle \
  --hostname="$HOSTNAME-$APPNAME" \
  --env-file=$ENV_FILE \
  --link=mongodb:mongodb --env=MONGO_URL=mongodb://mongodb:27017/$APPNAME \
  --log-opt max-size=100m --log-opt max-file=10 \
  --name=$APPNAME \

Leave a Reply

Your email address will not be published. Required fields are marked *