services:
  postgres:
    image: postgres
    restart: always
    volumes:
      - formly_postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: avnadmin
      POSTGRES_DB: backend-dev
      POSTGRES_PASSWORD: devpass
    ports:
      - '5432:5432'

  postgres-test:
    image: postgres
    restart: always
    volumes:
      - formly_postgres_test_data:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: avnadmin
      POSTGRES_DB: backend-test
      POSTGRES_PASSWORD: testpass
    ports:
      - '5433:5432'

volumes:
  formly_postgres_data:
  formly_postgres_test_data:
