Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.

🗄 PostgreSQL + Redis. Self-Hosted. Docker + Traefik + HTTPS.

Notifications You must be signed in to change notification settings

starters-dev/postgres-and-redis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deploying PostgreSQL and Redis behind Traefik in the Cloud


⚠️ This repo is not maintained anymore. Please, use https-backend instead.


This starter is useful for development purposes and faster environment setup.

It deploys PostgreSQL and Redis containers on a server and the containers are exposed to public. So you can share it among the teammates.

For the full explanation, check out the article.

Quick tutorial

  1. Create new droplet in DigitalOcean.
  2. Clone the repo:
> git clone https://github.com/kanzitelli/postgres-and-redis-behind-traefik.git backend
> cd backend
  1. Set up .env file:
> nano .env

Content of .env file should look like this:

# Postgres
DB_NAME=db
DB_USER=admin
DB_PASS=pass_12345qwerty
  1. Build docker compose file
> sh build.sh
  1. Connect to PostgreSQL and Redis
Postgres:
  Domain: postgresql://admin:[email protected]:5432/db
  IP: postgresql://admin:[email protected]:5432/db

Redis:
  Domain: redis://db.website.com:6379
  IP: redis://46.101.120.53:6379