version: "3.8"

services:
  micro-app:
    build: .
    container_name: ${APP}
    volumes:
      - ./:/app
    ports:
      - "${PORT}:${PORT}"
    command: sh -c "npm install && npm start"
  db:
    image: postgres:16
    container_name: postgres-db
    restart: always
    environment:
      POSTGRES_USER: how2ice
      POSTGRES_PASSWORD: tnals1459
      POSTGRES_DB: mydb
    ports:
      - "5432:5432"
    volumes:
      - ./db_data/data:/var/lib/postgresql/data
      - ./db_data/init.sql:/docker-entrypoint-initdb.d/init.sql
    #networks:
     # - msa-net
volumes:
  db:

