docker 2 posts

Inhji posted

How to setup for development on ubuntu 18.04

First clone the repo:

git clone

You need a couple of dependencies, so install those:

# install pyenv and python3.7.5
curl | bash
exec $SHELL # reloads the shell
pyenv install 3.7.5

# docker
# follow the instructions at
# then add your user to the docker group
sudo groupadd docker
sudo systemctl restart docker

# docker-compose
sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

In the directory, create and activate the virtual env:

pyenv virtualenv 3.7.5
pyenv local

Now install the dependencies:

pip3 install wheel
pip3 install -r requirements.txt

create the initial config file me.yml

sudo make config

download static files (css, emojis)

make css

Now you can run create the container and run the flask server:

sudo env POUSSETACHES_AUTH_KEY="<secret-key>" docker-compose -f docker-compose-dev.yml up -d
FLASK_DEBUG=1 MICROBLOGPUB_DEBUG=1 POUSSETACHES_AUTH_KEY="<secret-key>" flask run -p 5005 --with-threads

Inhji posted

How to setup for development on ubuntu 18.04

I had to install python3.8 via apt-get

sudo apt install python3.8 python3.8-venv python3.8-dev

Some packages failed to build so I had to install wheel:

pip3 install wheel

I also had to do the post installation steps for running docker as a non-root user, and then log out and back in:

sudo usermod -aG docker $USER

After that, I noticed that docker-compose was not correctly installed, so I reinstalled it (

I will create a proper tutorial for people that don’t have experience with python nor docker. Maybe.