The main goal of this gist is to demonstrate how to set up a PostgreSQL container and enable a Ruby on Rails application to connect to the database via PostgreSQL running in Docker.
- Create
docker-compose.yml
file:
services:
postgres:
image: postgres:14-alpine
restart: always
ports: