Deploying PostgreSQL and Redis behind Traefik in the Cloud

Postgres:
Domain: postgresql://admin:pass@db.website.com:5432/db
IP: postgresql://admin:pass@46.101.120.53:5432/db
Redis:
Domain: redis://db.website.com:6379
IP: redis://46.101.120.53:6379

Setting up a server

Setting up DigitalOcean’s new droplet
Created droplet
DigitalOcean console

Building Docker Compose

Docker Compose file with Traefik, PostgreSQL and Redis

Deploying in the Cloud

> git clone https://github.com/kanzitelli/postgres-and-redis-behind-traefik.git backend
> cd backend
> nano .env
# Postgres
DB_NAME=db
DB_USER=admin
DB_PASS=pass_12345qwerty
> sh build.sh
> docker ps

Checking the setup

Traefik Dashboard
Postico

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Batyr

Batyr

Problems solver. Open Source Staff. MS in CS. https://batyr.io