forklaunch 0.5.0

Launch faster with forklaunch
lockfileVersion: '9.0'

settings:
  autoInstallPeers: true
  excludeLinksFromLockfile: false

importers:

  .:
    dependencies:
      dotenv:
        specifier: ^17.2.3
        version: 17.2.3

packages:

  dotenv@17.2.3:
    resolution: {integrity: sha512-JVUnt+DUIzu87TABbhPmNfVdBDt18BLOWjMUFJMSi/Qqg7NTYtabbvSNJGOJ7afbRuv9D/lngizHtP7QyLQ+9w==}
    engines: {node: '>=12'}

networks:
  compile-test-bun-application-network:
    name: compile-test-bun-application-network
    driver: bridge

services:
  tempo:
    image: grafana/tempo:latest
    ports:
      - 3200:3200
      - 4317:4317
    networks:
      - compile-test-bun-application-network
    volumes:
      - ./monitoring/tempo.yaml:/etc/tempo.yaml
    command: '-config.file=/etc/tempo.yaml'
    healthcheck:
      test:
        - CMD
        - wget
        - '--no-verbose'
        - '--tries=1'
        - '--spider'
        - http://localhost:3200/ready
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 60s
  loki:
    image: grafana/loki:latest
    ports:
      - 3100:3100
    networks:
      - compile-test-bun-application-network
    healthcheck:
      test:
        - CMD
        - wget
        - '--no-verbose'
        - '--tries=1'
        - '--spider'
        - http://localhost:3100/ready
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 30s
  prometheus:
    image: prom/prometheus:latest
    ports:
      - 9090:9090
    networks:
      - compile-test-bun-application-network
    volumes:
      - ./monitoring/prometheus.yaml:/etc/prometheus/prometheus.yml
    healthcheck:
      test:
        - CMD
        - wget
        - '--no-verbose'
        - '--tries=1'
        - '--spider'
        - http://localhost:9090/-/healthy
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 30s
  grafana:
    image: grafana/grafana:latest
    ports:
      - 3000:3000
    networks:
      - compile-test-bun-application-network
    volumes:
      - ./monitoring/grafana-provisioning/datasources:/etc/grafana/provisioning/datasources
      - ./monitoring/grafana-provisioning/dashboards:/etc/grafana/provisioning/dashboards
    healthcheck:
      test:
        - CMD
        - wget
        - '--no-verbose'
        - '--tries=1'
        - '--spider'
        - http://localhost:3000/api/health
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 30s
  otel-collector:
    image: otel/opentelemetry-collector:latest
    ports:
      - 4318:4318
      - 8889:8889
    networks:
      - compile-test-bun-application-network
    volumes:
      - ./monitoring/otel-collector-config.yaml:/etc/otel-collector-config.yaml
    command: '--config=/etc/otel-collector-config.yaml'
  redis:
    container_name: compile-test-bun-application-redis
    image: redis/redis-stack-server:latest
    restart: always
    ports:
      - 6379:6379
    networks:
      - compile-test-bun-application-network
    healthcheck:
      test:
        - CMD
        - redis-cli
        - ping
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 10s
  postgresql:
    hostname: postgresql
    container_name: compile-test-bun-application-postgresql
    image: postgres:latest
    restart: unless-stopped
    environment:
      POSTGRES_USER: postgresql
      POSTGRES_PASSWORD: postgresql
      POSTGRES_HOST_AUTH_METHOD: trust
    ports:
      - 5432:5432
    networks:
      - compile-test-bun-application-network
    volumes:
      - compile-test-bun-application-postgresql-data:/var/lib/postgresql/data
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready -U postgresql -d compile-test-bun-application-iam-dev -h localhost
      interval: 10s
      timeout: 5s
      retries: 5
      start_period: 30s
  billing:
    hostname: billing
    container_name: compile-test-bun-application-billing-bun
    image: compile-test-bun-application-billing-bun:latest
    restart: always
    build:
      context: ../../../../../../src/modules
      dockerfile: ./Dockerfile
    environment:
      NODE_ENV: development
      HOST: 0.0.0.0
      PROTOCOL: http
      PORT: '8000'
      VERSION: v1
      DOCS_PATH: /docs
      OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
      OTEL_SERVICE_NAME: compile-test-bun-application-billing
      REDIS_URL: redis://redis:6379
      DB_NAME: compile-test-bun-application-billing-dev
      DB_HOST: postgresql
      DB_USER: postgresql
      DB_PASSWORD: postgresql
      DB_PORT: '5432'
    depends_on:
      redis:
        condition: service_started
      postgresql:
        condition: service_started
    ports:
      - 8000:8000
    networks:
      - compile-test-bun-application-network
    volumes:
      - ./billing:/compile-test-bun-application/billing
      - /compile-test-bun-application/billing/dist
      - /compile-test-bun-application/billing/node_modules
      - /compile-test-bun-application/core/node_modules
      - /compile-test-bun-application/node_modules
    working_dir: /compile-test-bun-application/billing
    entrypoint:
      - bun
      - run
      - dev
    healthcheck:
      test:
        - CMD
        - curl
        - '-f'
        - http://localhost:8000/health
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
  iam:
    hostname: iam
    container_name: compile-test-bun-application-iam-bun
    image: compile-test-bun-application-iam-bun:latest
    restart: always
    build:
      context: ../../../../../../src/modules
      dockerfile: ./Dockerfile
    environment:
      NODE_ENV: development
      HOST: 0.0.0.0
      PROTOCOL: http
      PORT: '8001'
      VERSION: v1
      DOCS_PATH: /docs
      OTEL_EXPORTER_OTLP_ENDPOINT: http://otel-collector:4318
      OTEL_SERVICE_NAME: compile-test-bun-application-iam
      PASSWORD_ENCRYPTION_PUBLIC_KEY_PATH: ./public.pem
      DB_NAME: compile-test-bun-application-iam-dev
      DB_HOST: postgresql
      DB_USER: postgresql
      DB_PASSWORD: postgresql
      DB_PORT: '5432'
    depends_on:
      postgresql:
        condition: service_started
    ports:
      - 8001:8001
    networks:
      - compile-test-bun-application-network
    volumes:
      - ./iam:/compile-test-bun-application/iam
      - /compile-test-bun-application/iam/dist
      - /compile-test-bun-application/iam/node_modules
      - /compile-test-bun-application/core/node_modules
      - /compile-test-bun-application/node_modules
    working_dir: /compile-test-bun-application/iam
    entrypoint:
      - bun
      - run
      - dev
    healthcheck:
      test:
        - CMD
        - curl
        - '-f'
        - http://localhost:8001/health
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s

snapshots:

  dotenv@17.2.3: {}

volumes:
  compile-test-bun-application-postgresql-data:
    driver: local