- Generate Rails 8.1 app with PostgreSQL and TailwindCSS - Add docker-compose.yml (postgres:17) for local database - Configure database.yml to connect to Dockerized Postgres via env vars - Add Pages#home root route, application layout, and navbar partial
19 lines
423 B
YAML
19 lines
423 B
YAML
services:
|
|
db:
|
|
image: postgres:17
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
|
ports:
|
|
- "${POSTGRES_PORT:-5432}:5432"
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres}"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
pgdata:
|