Last active
February 27, 2023 15:51
-
-
Save fdocr/e24788ace644508154f41e27a89c4ba1 to your computer and use it in GitHub Desktop.
A quick and dirty way to setup a Redis+Postgres utility server with docker
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Update-Upgrade & Install docker | |
apt update | |
apt full-upgrade | |
# Docker -> https://docs.docker.com/engine/install/ubuntu/ | |
# Redis (https://hub.docker.com/_/redis) | |
mkdir redis_data | |
docker run --name redis -d --restart always -p 6379:6379 -v /root/redis_data:/data redis redis-server --save 60 1 --loglevel warning --requirepass <password> | |
# PG (https://hub.docker.com/_/postgres) | |
mkdir pg_data | |
docker run --name pg -e POSTGRES_DB=home -e POSTGRES_USER=epona -e POSTGRES_PASSWORD=<password> -d --restart=always -v /root/pg_data:/var/lib/postgresql/data -p 5432:5432 postgres:14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment