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

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

The Journey of SLIIT FOSS Website

Using DBT to Execute ELT Pipelines in Snowflake

Superalgos Review — Reviewing the starting tutorials

Agile Manifesto

One Step Forward

What’s the point of <script> elements in an HTML doc?

Run SystemVerilog on a Mac

Coding’s true purpose

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

More from Medium

How to deploy FastAPI with Nginx and Supervisor

Docker Desktop Alternative (Docker-CLI + Docker-Compose + Minkube + Hyperkit)

Collect http status Nginx — Prometheus (Docker)

Build gRPC with Go (golang): Unary API