101t / jasmin-web-panel

📨 Jasmin Web Panel for Jasmin SMS Gateway
https://youtu.be/z-BFJzWtq1M
83 stars 78 forks source link

Submit Log issue in docker ! #65

Closed dfangys closed 1 year ago

dfangys commented 1 year ago

Hello I installed Jasmin SMS Gateway, and Jasmin web panel successfully docker but I have an issue to setup the Submit Log in the docker with the project, can you help me do it? jasmin web panel compose file


services:
  jasmin_web:
    image: tarekaec/jasmin_web_panel:1.1
    ports:
      - "8077:8000"
    deploy:
      replicas: 1
      update_config:
        order: start-first
    env_file:
      - .env
    environment:
      DEBUG: '1'
      DJANGO_SETTINGS_MODULE: config.settings.pro
      ALLOWED_HOSTS: '*'
      PRODB_URL: postgres://jasmin:jasmin@jasmin_postgres:5432/jasmin
      REDIS_URI: redis://jasmin_redis:6379/1
      TELNET_HOST: 10.0.10.5
      SUBMIT_LOG: 1
    volumes:
      - web_public:/app/public
      - web_logs:/app/logs
    depends_on:
      - jasmin_redis
      - jasmin_postgres

  jasmin_celery:
    image: tarekaec/jasmin_web_panel:1.1
    entrypoint: bash ./docker-entrypoint-celery.sh
    deploy:
      replicas: 1
    env_file:
      - .env
    environment:
      DEBUG: 0
      PRODB_URL: postgres://jasmin:jasmin@127.0.0.1:5432/jasmin
      DJANGO_SETTINGS_MODULE: config.settings.pro
      CELERY_BROKER_URL: redis://jasmin_redis:6379/0
      CELERY_RESULT_BACKEND: redis://jasmin_redis:6379/0
      CELERY_LOG_LEVEL: info
    healthcheck:
      disable: true
    depends_on:
      - jasmin_redis
      - jasmin_postgres

  jasmin_redis:
    image: redis:alpine
    tty: true
    volumes:
      - redis_data:/data
    command:
      - 'redis-server'
      - '--appendonly yes'
      - '--save 60 1'
    environment:
      REDIS_REPLICATION_MODE: master
      ALLOW_EMPTY_PASSWORD: "yes"

  sms_logger:  # New service
    image: tarekaec/jasmin_log:1.1
    volumes:
      - ./config/docker/jasmin/jasmin/resource/amqp0-9-1.xml:/etc/jasmin/resource/amqp0-9-1.xml  
    environment:
      DB_TYPE_MYSQL: '0'  # Indicates the use of PostgreSQL
      DB_HOST: '127.0.0.1'  # Hostname or IP for your database
      DB_DATABASE: 'jasmin'  # The name of your database
      DB_USER: 'jasmin'  # The user for your database
      DB_PASS: 'jasmin'  # The password for your database
  jasmin_postgres:
    image: postgres:latest
    environment:
      POSTGRES_USER: jasmin
      POSTGRES_PASSWORD: jasmin
      POSTGRES_DB: jasmin
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  redis_data:
    driver: local
  web_public:
    driver: local
  web_logs:
    driver: local
  postgres_data:
    driver: local

networks:
  default:
    external:
      name: jasmin_swarm_network

jasmin compose file


services:
  redis:
    image: redis:alpine
    restart: unless-stopped
    healthcheck:
      test: redis-cli ping | grep PONG
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  rabbit-mq:
    image: rabbitmq:3.10-management-alpine
    restart: unless-stopped
    healthcheck:
      test: rabbitmq-diagnostics -q ping
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  prometheus:
    image: prom/prometheus:latest
    restart: unless-stopped
    ports:
      - '9091:9090'
    volumes:
      - ./docker/prometheus/config/prometheus.yml:/etc/prometheus/prometheus.yml
      - monitoring_data:/prometheus
    command:
      - '--config.file=/etc/prometheus/prometheus.yml'
      - '--storage.tsdb.path=/prometheus'
      - '--web.console.libraries=/etc/prometheus/console_libraries'
      - '--web.console.templates=/etc/prometheus/consoles'
      - '--web.enable-lifecycle'
    depends_on:
      - jasmin
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  grafana:
    image: grafana/grafana
    restart: unless-stopped
    ports:
      - 3000:3000
    environment:
      GF_INSTALL_PLUGINS: "grafana-clock-panel,grafana-simple-json-datasource"
    volumes:
      - ./docker/grafana/provisioning/datasources:/etc/grafana/provisioning/datasources:ro
      - ./docker/grafana/provisioning/dashboards:/etc/grafana/provisioning/dashboards:ro
      - ./docker/grafana/dashboards:/opt/grafana-dashboards:ro

      - monitoring_data:/var/lib/grafana
    depends_on:
      - prometheus
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

  jasmin:
    build:
      context: ./
      dockerfile: ./docker/Dockerfile.dev
    restart: unless-stopped
    volumes:
      - ./jasmin:/usr/jasmin/jasmin
    ports:
      - 2777:2775
      - 9880:8990
      - 1404:1401
    depends_on:
      redis:
        condition: service_healthy
      rabbit-mq:
        condition: service_healthy
    environment:
      REDIS_CLIENT_HOST: redis
      AMQP_BROKER_HOST: rabbit-mq
    deploy:
      resources:
        limits:
          cpus: '2.0'
          memory: 8G
    security_opt:
      - no-new-privileges:true

volumes:
  monitoring_data: { }

networks:
  default:
    external:
      name: jasmin_swarm_network
101t commented 1 year ago

Hello @dfangys here in this link I used submit_log that used in jasmin image, you may check the link

dragelecpc commented 6 months ago

@dfangys have you installed jasmin with sumbit log successfully?