version: "3.9"
services:
  app_sta:
    container_name: tdbschedulersta_latest
    image: tdbschedulersta:latest
    restart: always
    build: .
    ports:
      - "3007:3006"
    depends_on:
      - mongo_sta
      - redis_sta
    environment:
      MONGO_DB_URL: "mongodb://tdbschedulersta_mongo:27017"
      MONGO_DB_NAME: "tdbscheduler"
      MONGO_DB_USER: "CifkpX8SU4y8w0z5"
      MONGO_DB_PASS: "XzBdYQcA0u0i1Asw"
      NODE_ENV: "prod"
      MAX_CPUS: "4"
      JWT_ACCESS_TOKEN_SECRET: "cHVwYXp6ZXR0bw=="
      CRYPTO_ALGORITHM: "aes-256-ctr"
      CRYPTO_SECRETKEY: "vOVH6sdmpNWjRRIqCc7rdxs01lwHzfr3"
      REDIS_URL: "redis://:JvTFKJx60ER3twqJ@tdbschedulersta_redis:6379/15"
      SENDERMAIL_HOST: "ssl0.ovh.net"
      SENDERMAIL_USER: "monitoring@thedigitalbox.com"
      SENDERMAIL_PASS: "Digital-2021"
      SENDERMAIL_TO: "dev@thedigitalbox.com"
    volumes:
      - ./logs_sta:/code/logs
    networks:
      - tdb-scheduler-sta
  mongo_sta:
    container_name: tdbschedulersta_mongo
    image: mongo
    restart: always
    volumes:
      - ./mongodb_sta_data:/data/db
    environment:
      MONGO_INITDB_ROOT_USERNAME: "CifkpX8SU4y8w0z5"
      MONGO_INITDB_ROOT_PASSWORD: "XzBdYQcA0u0i1Asw"
      TZ: "Europe/Rome"
    ports:
      - "27020:27017"
    networks:
      - tdb-scheduler-sta
  redis_sta:
    container_name: tdbschedulersta_redis
    image: redis
    restart: always
    command: '--requirepass JvTFKJx60ER3twqJ'
    environment:
      TZ: "Europe/Rome"
    ports:
      - "6381:6379"
    networks:
      - tdb-scheduler-sta
  workerwritecron_sta:
    container_name: workerwritecronsta_latest
    image: workerwritecronsta:latest
    restart: always
    build: 
      context: .
      dockerfile: DockerfileWriteUpdateQueue
    depends_on:
      - mongo_sta
      - redis_sta
    environment:
      MONGO_DB_URL: "mongodb://tdbschedulersta_mongo:27017"
      MONGO_DB_NAME: "tdbscheduler"
      MONGO_DB_USER: "CifkpX8SU4y8w0z5"
      MONGO_DB_PASS: "XzBdYQcA0u0i1Asw"
      NODE_ENV: "prod"
      MAX_CPUS: "4"
      JWT_ACCESS_TOKEN_SECRET: "cHVwYXp6ZXR0bw=="
      CRYPTO_ALGORITHM: "aes-256-ctr"
      CRYPTO_SECRETKEY: "vOVH6sdmpNWjRRIqCc7rdxs01lwHzfr3"
      REDIS_URL: "redis://:JvTFKJx60ER3twqJ@tdbschedulersta_redis:6379/15"
      SENDERMAIL_HOST: "ssl0.ovh.net"
      SENDERMAIL_USER: "monitoring@thedigitalbox.com"
      SENDERMAIL_PASS: "Digital-2021"
      SENDERMAIL_TO: "dev@thedigitalbox.com"
    volumes:
      - ./logs_sta:/code/logs
    networks:
      - tdb-scheduler-sta
networks:
  tdb-scheduler-sta:
