Repository available at: Deploy Traefik, Portainer, Postgres & pgadmin with Docker using LetsEncrypt to manage certificates.
In this guide we will
Required:
You have 3 domain names configured, e.g:
git clone https://gitlab.com/ArnaudSene/postgres-traefik-docker.git
cd postgres-traefik-docker
go to ./postgres-traefik-docker/apps/postgres
cp env-custom .env
vi .env
Replace values between <> with your data.
POSTGRES_USER=postgres
POSTGRES_PASSWORD=<password>
POSTGRES_DB=<db_name>
PGADMIN_DEFAULT_EMAIL=<email>
PGADMIN_DEFAULT_PASSWORD=<pg_password>
PGADMIN_HOST=pgadmin.<domain_name>
go to ./postgres-traefik-docker/traefik
cp env-custom .env
vi .env
Replace values between <> with your data.
CERT_EMAIL=<email@domain_name>
TRAEFIK_HOST=traefik.<domain_name>
PORTAINER_HOST=portainer.<domain_name>
go to ./postgres-traefik-docker/traefik
sudo apt-get update
sudo apt-get install apache2-utils
traefik/users_file
(htpasswd)htpasswd -nb admin your_password > users_file
traefik/users_file
sudo chmod 600 users_file
traefik/data/acme.json
go to ./postgres-traefik-docker/traefik/data
sudo chmod 600 acme.json
Start Traefik reverse proxy
go to ./postgres-traefik-docker/traefik
chmod u+x start.sh
chmod u+x stop.sh
./start.sh
Start Postgres & pgadmin
go to ./postgres-traefik-docker/apps/postgres
chmod u+x start.sh
chmod u+x stop.sh
./start.sh
Stop Traefik reverse proxy
go to ./postgres-traefik-docker/traefik
./stop.sh
Start Postgres & pgadmin
go to ./postgres-traefik-docker/apps/postgres
./stop.sh
Protected with basicAuth
. Use your encrypted password to log in.
https://traefik.your-domain-name.com
Create a user and password first then log in.
https://portainer.your-domain-name.com
Credentials defined in .env file