Skip to content

Muppy - Portable Muppy - Running muppy locally with Docker [optional, Enterprise edition only]

Muppy Enterprise customers can — if they subscribed to the option — run Muppy locally from the Docker images.

Every feature is available in that version.

Prerequisites:

  • An access Token for the Muppy Container Registry
  • Docker
  • Available from muppy 14.18.0

Careful: not tested on Windows.

PostgreSQL setup

sudo apt update && sudo apt install postgresql -y 

Edit /etc/postgresql/{version}/(cluster}/postgresql.conf to add the line:

listen_addresses = '*'

Edit /etc/postgresql/{version}/(cluster}/pg_hba.conf to add the following line:

host    all             all             172.17.0.1/16           scram-sha-256

Create the postgresql user and the muppy database:

pg_ctlcluster restart 14 main
sudo su - postgres -c "psql -c \"CREATE ROLE muppy WITH LOGIN PASSWORD 'choose_it_wisely';\" postgres"
sudo su - postgres -c "psql -c \"CREATE DATABASE muppy OWNER muppy;\" postgres"

Initialise the database

sudo docker run \
    --add-host=host.docker.internal:host-gateway \
    --env PGHOST="host.docker.internal" \
    --env PGPASSWORD="choose_it_wisely" \
    --env PGDATABASE="muppy" \
    --env MPY_MAIN_USER_INIT="Cyril MORISSE|cmorisse@boxes3.net|choose_it_more_wisely" \
    -it --rm registry.gitlab.com/cmorisse/appserver-mpy/mpy13c:latest --init=muppy_allinone_installer --without-demo=all --stop-after-init

Launch muppy

sudo docker run -p 8069:8069/tcp -p 8072:8072/tcp \
    --add-host=host.docker.internal:host-gateway \
    --env PGHOST="host.docker.internal" \
    --env PGPASSWORD="choose_it_wisely" \
    --env PGDATABASE="muppy" \
    --env IKB_PROXY_MODE="True" \
    -it --rm registry.gitlab.com/cmorisse/appserver-mpy/mpy13c:latest --workers=2

Muppy is then available on port 8069 — but it cannot be reached from the internet.

Making muppy reachable from the Internet

The simplest way is a tunnel, such as:

ngrok

./ngrok http 8069
./ngrok http 8069 --domain positively-decent-oriole.ngrok-free.app

Open the ngrok URL and log in with the email and password set through the MPY_MAIN_USER_INIT ENV VAR, at the initialisation step.

Debug mode

Launch a shell inside the muppy container:

docker run -it --rm \
    --entrypoint=/bin/bash \
    --add-host=host.docker.internal:host-gateway \
    registry.gitlab.com/cmorisse/appserver-mpy/mpy13c:latest 

Debug commands

sudo apt update && sudo apt install -y iputils-ping