HHHMHA/recipe-app-api

View on GitHub
docker-compose.yml

Summary

Maintainability
Test Coverage
version: "3"

services:
  app:
    build:
      context: .
    ports:
    - "8000:8000"
    volumes:
    - ./app:/app
    command: sh -c "python manage.py wait_for_db &&
                    python manage.py migrate &&
                    python manage.py runserver 0.0.0.0:8000"
    environment:
      - DB_HOST=db
      - DB_NAME=app
      - DB_USER=postgres
      - DB_PASS=thehellisthat
    depends_on:
      - db

  db:
    image: postgres:10-alpine
    environment:
      - POSTGRES_DB=app
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=thehellisthat