rootstrap/rails_api_base

View on GitHub
docker-compose.yml

Summary

Maintainability
Test Coverage
services:
  web:
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - 3000:3000
    environment:
      POSTGRES_USER: postgres
      POSTGRES_HOST: db
      BINDING: 0.0.0.0
    tty: true
    stdin_open: true
    volumes:
      - .:/src/app
      - node_modules:/src/app/node_modules
    depends_on:
      - db
    links:
      - db:db
    healthcheck:
        test: ["CMD", "curl", "-f", "http://localhost:3000"]
        interval: 1m30s
        timeout: 10s
        retries: 3
        start_period: 40s
  db:
    image: postgres:15
    environment:
      POSTGRES_USER: postgres
      POSTGRES_HOST_AUTH_METHOD: trust
    volumes:
      - db_data:/var/lib/postgresql/data
    ports:
      - 5432:5432
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres -h localhost"]
      interval: 30s
      timeout: 10s
      retries: 5
      start_period: 20s
volumes:
  db_data:
  node_modules: