Team Password Manager is a web based password manager for teams. This repository aims to provide a basis to use teampasswordmanager in production via docker and docker-compose. It features:
- almost completely automated setup of teampasswordmanager, only one config file needs to be touched
- builtin letsencrypt support: Helper script to test setup and obtain certificates via certbot
- automatic letsencrypt certificate renewal
- SSL offloading via a nginx reverse proxy
- OWASP recommended nginx settings
- docker >= 1.10
- docker-compose >= 1.8
- for LetsEncrypt: A domain pointing to the public IP address of the server intended to run the docker-compose stack for passbolt
- a server publicly reachable on ports 80 and 443
-
Clone this repository
git clone https://github.com/Riodigital-de/team-password-manager-docker-compose.git /path/to/where/youWant/theFilesToSit
-
Make sure you have docker and docker-compose up and running
-
Copy .env.dist to .env and open it with your favored editor and change the values to your needs Have a look at the section on the contens of .env to see what every entry does
-
Build the images for the compose stack
docker-compose build
-
Start the (nginx-reverse-)proxy container in interactive mode while overriding the default command to bash and mapping port 80 and 443 explicitly:
docker-compose run -ti -p 80:80 -p 443:443 proxy bash
Depending on the hardware specs and available bandwidth of your machine, the startup may take a couple of minutes the first time. The proxy container depends on the app container, which depends on the database container, so these two are started first.
-
From inside the proxy container, perform a dry run of the included letsencrypt helper scripts
sh /dry-run.sh
-
If everything checks out, actually obtain the letsencrypt certificates:
sh /get-cert.sh
-
Exit the container
exit -
Identify the name of the run instance of the proxy container you just exited
docker-compose ps
The name should be something like teampasswordmanager_proxy_run_1 , where teampasswordmanager is equal to your current directory name.
-
Stop the proxy container run instance and remove it
docker stop name_of_the_run_instance && docker rm name_of_the_run_instance -
Start the rest of the docker-compose stack
docker-compose up
-
Visit http://YOUR.TEAMPASSWORD.DOMAIN/install and fill out required fields
- app_dockerfile: Tells docker-compose which dockerfile to use when building the app container. The default is 'production.Dockerfile'.
- app_db_host: Tells teampasswordmanager which Database to use.
- db_root_password: The mysql root users password
- db_name: The name of the database for teampasswordmanager. The default is 'teampasswordmanager'
- db_user: The name of the mysql user for the teampasswordmanager database. The default is 'teampasswordmanager'
- db_password: The password for the teampasswordmanager mysql user
- proxy_dockerfile: Tells docker-compose which dockerfile to use when building the proxy container. The default is 'production.Dockerfile'.
- proxy_domain: the domain under which your teampasswordmanager instance should be reachable, e.g. YOUR.TEAMPASSWORD.DOMAIN.com. Please make sure to update the DNS records for this domain to point to the machine you want to run teampasswordmanager on.