Managed database or docker image with data-volume?
0
votes
0
answers
37
views
I've mostly used managed database (AWS RDS) for production. I was fiddling with docker and was wondering if it's a good idea to have containerised postgres database with data-volume?
I feel it may not be a good idea, maybe because, I'm used to convenience of using managed database in production, but would like to know community opinion on this.
My docker-compose.yml looks like following:
version: '3'
services:
rails-api:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
volumes:
- .:/usr/src/app
- gem_cache:/gems
depends_on:
- database
networks:
- vilio-network
env_file:
- .env/production
redis:
image: redis
database:
image: postgres
ports:
- "5432:5432"
networks:
- vilio-network
env_file:
- .env/production
volumes:
- db_data:/var/lib/postgresql/data
networks:
vilio-network:
volumes:
db_data:
gem_cache:
Thank you
Asked by Indyarocks
(101 rep)
Sep 21, 2023, 08:34 PM