version: '3.8'

services:
  node:
    image: 'docker.1ms.run/node:20.18.3'
    container_name: node
    restart: always
    working_dir: /app
    volumes:
      - /mnt/app:/app
    ports:
      - '8080:8080'
    command: 'sleep infinity'

  postgres:
    image: 'docker.1ms.run/postgres:latest'
    container_name: postgres
    restart: always
    environment:
      POSTGRES_DB: d8dai
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
    volumes:
      - /mnt/postgres-data:/var/lib/postgresql/data
    ports:
      - '5432:5432'

  redis:
    image: 'docker.1ms.run/redis:7.0.4'
    container_name: redis
    restart: always
    volumes:
      - /mnt/redis-data:/data
    ports:
      - '6379:6379'

  pgadmin:
    image: 'docker.1ms.run/elestio/pgadmin:latest'
    container_name: pgadmin
    restart: always
    environment:
      PGADMIN_DEFAULT_EMAIL: admin@example.com
      PGADMIN_DEFAULT_PASSWORD: admin
    ports:
      - '38091:80'
    depends_on:
      - postgres

  minio:
    image: 'docker.1ms.run/minio:latest'
    container_name: minio
    restart: always
    volumes:
      - /mnt/minio-data:/data
    ports:
      - '9000:9000'
      - '9001:9001'
    environment:
      MINIO_ROOT_USER: minioadmin
      MINIO_ROOT_PASSWORD: minioadmin
      MINIO_DEFAULT_BUCKETS: 'd8dai'
      MINIO_BROWSER: "on"
