version: "3"

services:
  web:
    build: .
    env_file:
      - .env
    volumes:
      - .:/var/www/html
    networks:
      - backend
    ports:
      - 4545:80
    restart: always
    depends_on:
      - db
  db:
    image: postgres:10-alpine
    environment:
      POSTGRES_DB: tissue
      POSTGRES_USER: tissue
      POSTGRES_PASSWORD: tissue
    volumes:
      - db:/var/lib/postgresql/data
    networks:
      - backend
    restart: always

networks:
  backend:

volumes:
  db: