
services:
  db:
    image: postgres:15-alpine
    container_name: synchronization_api_db
    restart: always
    tty: true
    volumes:
      - ./.docker/postgres/data:/var/lib/postgresql/data
      - ./.docker/postgres/init.sql:/docker-entrypoint-initdb.d/init.sql
      - ./.docker/postgres/backups:/backups
    environment:
      - POSTGRES_PASSWORD=${DATABASE_PASSWORD:-shoppeeintegration}
      - POSTGRES_USER=${DATABASE_USERNAME:-shoppeeintegration}
      - POSTGRES_DB=${DATABASE_NAME:-shoppeeintegration}
    ports:
      - "5432:5432"
    networks:
      - synchronization_api

  pgadmin:
    image: dpage/pgadmin4:7
    container_name: synchronization_api_pgadmin
    restart: always
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@admin.com
      PGADMIN_DEFAULT_PASSWORD: innoveVipi123
    ports:
      - "8080:80"
    networks:
      - synchronization_api
    depends_on:
      - db
    volumes:
      - pgadmin_data:/var/lib/pgadmin

  
networks:
  synchronization_api:
    driver: bridge

volumes:
  pg_data:
  pgadmin_data: