1.3 KiB
1.3 KiB
Docker + Postgres + NGINX + Letsencrypt
This is a more advanced example of running an instance of the Padloc server component and web app with Docker and Docker Compose, using:
- PostgreSQL as the datababase backend
- NGINX as a reverse proxy.
- Letsencrypt for obtaining a TLS certificate.
Setup Instructions
-
Install Docker and Docker Compose
-
Clone or download this folder and
cd
into it. -
Edit the
.env
file to set your STMP settings, Postgres database name, username and password, and the host name / domain you want to host the web app and server under. -
Obtain an TLS certificate
docker-compose up cerbot
-
Start the server, pwa, database and reverse proxy:
docker-compose up -d
Thats it! The web app is now available at https://$PL_HOSTNAME
Renewing the TLS certificate
TLS certificates issued by Letsencrypt are usually valid for 90 days, so you'll have to regularly renew your certificate. To do so, simply run the following:
docker-compose down && \
docker-compose up certbot && \
docker-compose up -d