version: '3'
services:
  dataact-broker-db:
    container_name: dataact-broker-db
    image: postgres:10.6-alpine
    restart: on-failure:3 # 3 max attempt, and then it will stop restarting
    environment:
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: root
      POSTGRES_DB: data_broker
    ports:
      - "8000:5432"

  dataact-broker-backend:
    container_name: dataact-broker-backend
    image: dataact-broker-backend
    build:
      context: ./
    depends_on:
      - dataact-broker-db
    restart: on-failure:3 # 3 max attempt, and then it will stop restarting
    command: /bin/sh -c "cd ./dataactcore; sleep 9s; alembic upgrade head; python ../dataactbroker/app.py"
    ports:
      - "9999:9999"
    volumes:
      - ./:/data-act/backend

  dataact-broker-validator:
    container_name: dataact-broker-validator
    image: dataact-broker-backend
    restart: on-failure:5 # 5 max attempt, and then it will stop restarting
    command: /bin/sh -c "sleep 17s; python dataactvalidator/app.py"
    ports:
      - "8889:8889"
    volumes:
      - ./:/data-act/backend

version: '3'
services:
  dataact-broker-db:
    container_name: dataact-broker-db
    image: postgres:10.6-alpine
    restart: on-failure:3 # 3 max attempt, and then it will stop restarting
    environment:
      POSTGRES_USER: admin
      POSTGRES_PASSWORD: root
      POSTGRES_DB: data_broker
    ports:
      - "5435:5432"

  dataact-broker-backend:
    container_name: dataact-broker-backend
    image: dataact-broker-backend
    build:
      context: ./
    depends_on:
      - dataact-broker-db
    restart: on-failure:3 # 3 max attempt, and then it will stop restarting
    command: /bin/sh -c "cd ./dataactcore; sleep 9s; alembic upgrade head; python ../dataactbroker/app.py"
    ports:
      - "9999:9999"
    volumes:
      - ./:/data-act/backend

  dataact-broker-validator:
    container_name: dataact-broker-validator
    image: dataact-broker-backend
    restart: on-failure:5 # 5 max attempt, and then it will stop restarting
    command: /bin/sh -c "sleep 17s; python dataactvalidator/app.py"
    ports:
      - "8889:8889"
    volumes:
      - ./:/data-act/backend

Change postgres port to not conflict with api
Change postgres port to not conflict with api

Incremented a couple ports above 5432 for future-proofing (and selfishness since I have to move other things to 5433 sometimes)