A first attempt to dockerize the Mitro Password Manager after being released under GPL. I claim no authority in the field, i'm just trying to set up a simple deployment process for a Mitro server. Contributions are welcomed!
-
Clone the project and build the mitro and emailer images
git clone https://github.com/servomac/mitro.git cd mitro/centos docker build -t mitro:centos6 . cd ../emailer docker build -t emailer .
-
Run postgres
docker run --name mitro-postgres -e POSTGRES_PASSWORD="AGOODPASS" -d postgres
-
Execute the mitro server
docker run --restart 'always' \ --name mitro \ --link mitro-postgres:db \ -e DOMAIN="mitro.domain.com" \ -p 0.0.0.0:8443:8443 \ -d mitro:centos6
-
Execute the emailer container
docker run --restart 'always' \ --name mitro-emailer \ --link mitro-postgres:db \ -e MANDRILL_API_KEY="apikey" \ -e DOMAIN="mitro.domain.com" \ -d emailer
Once you have the server up and running, you can generate the browser extensions (chrome, firefox, even a python-hosted webpage) and copy them to the host:
$ docker exec -it mitro bash
[root@629244ad0dbf login]# cd ../browser-ext/api/
[root@629244ad0dbf login]# ./build.sh
[root@629244ad0dbf login]# cd ../login
[root@629244ad0dbf login]# make firefox chrome
[root@629244ad0dbf login]# scp -r build/{firefox,chrome}/ [email protected]:
Install the extension in your desired browser and add the certificate. TODO.
docker run -it --link mitro-postgres:db --rm postgres sh -c 'PGPASSWORD=$DB_ENV_POSTGRES_PASSWORD exec pg_dump -h "$DB_PORT_5432_TCP_ADDR" -p "$DB_PORT_5432_TCP_PORT" -U postgres mitro' | bzip2 > mitro.sql.bz2