actionHistory in docker

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • partomas
    Active Community Member
    • Sep 2018
    • 331

    actionHistory in docker

    Hello, does anyone know why in docker environment "actionHistory" don't show external IP address and how to fix it?
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #2
    Hi partomas,

    Please tell me what EspoCRM image do you use in your Docker environment?

    Comment


    • partomas
      partomas commented
      Editing a comment
      I'm using dockerHub latest version.
  • lazovic
    Super Moderator
    • Jan 2022
    • 809

    #3
    partomas,

    Try using the following image for your EspoCRM containers: espocrm/espocrm:fpm

    Comment


    • partomas
      partomas commented
      Editing a comment
      what is adifference from "Espocrm:latest"? and what to do with current instances to start see external user IP in logs?
  • Laimonas
    Senior Member
    • May 2021
    • 197

    #4
    lazovic it appears that the fpm​ image does not have a web server... Any ideas on how could we install a web server?

    Comment

    • lazovic
      Super Moderator
      • Jan 2022
      • 809

      #5
      espocrm/espocrm:fpm image uses FPM PHP implementation and, as was correctly noted earlier, it needs to be connected to the server. For example, you can use the attached docker-compose.yml file and nginx configuration.

      docker-compose.yml
      Code:
      version: '3'
      
      services:
      
        espocrm-db:
          image: mariadb:latest
          container_name: espocrm-db
          command: --max-allowed-packet=64MB
          restart: always
          environment:
            MARIADB_ROOT_PASSWORD: pass
            MARIADB_DATABASE: espocrm
            MARIADB_USER: espocrm
            MARIADB_PASSWORD: pass
          volumes:
            - ./data/mariadb/data:/var/lib/mysql
          networks:
            - espocrm-network
      
        espocrm-nginx:
          image: nginx
          container_name: espocrm-nginx
          environment:
            NGINX_HOST: my-domain.com
          restart: always
          depends_on:
            - espocrm
            - espocrm-websocket
          volumes:
            - ./data/nginx/conf.d/:/etc/nginx/templates
            - ./data/espocrm:/var/www/html
            - ./data/nginx/espocrm.conf:/etc/nginx/espocrm.conf
            - ./data/nginx/logs:/var/log/nginx
            - ./data/nginx/ssl:/etc/nginx/ssl:ro
            - ./data/nginx/certbot:/var/www/certbot
          ports:
            - "80:80"
            - "443:443"
          networks:
            - espocrm-network
      
        espocrm:
          image: espocrm/espocrm:fpm
          container_name: espocrm
          environment:
            ESPOCRM_DATABASE_HOST: espocrm-db
            ESPOCRM_DATABASE_USER: espocrm
            ESPOCRM_DATABASE_PASSWORD: pass
            ESPOCRM_ADMIN_USERNAME: admin
            ESPOCRM_ADMIN_PASSWORD: pass
            ESPOCRM_CONFIG_SITE_URL: "https://my-domain.com"
          restart: always
          depends_on:
            - espocrm-db
          volumes:
           - ./data/espocrm:/var/www/html
          networks:
            - espocrm-network
      
        espocrm-daemon:
          image: espocrm/espocrm:fpm
          container_name: espocrm-daemon
          volumes:
            - ./data/espocrm:/var/www/html
          restart: always
          depends_on:
            - espocrm
          entrypoint: docker-daemon.sh
          networks:
            - espocrm-network
      
        espocrm-websocket:
          container_name: espocrm-websocket
          image: espocrm/espocrm:fpm
          environment:
            ESPOCRM_CONFIG_USE_WEB_SOCKET: "true"
            ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBSCRIBER_DSN: "tcp://*:7777"
            ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBMISSION_DSN: "tcp://espocrm-websocket:7777"
          volumes:
           - ./data/espocrm:/var/www/html
          restart: always
          depends_on:
            - espocrm
          entrypoint: docker-websocket.sh
          ports:
            - "8080:8080"
          networks:
            - espocrm-network
      
        espocrm-certbot:
          image: certbot/certbot
          container_name: espocrm-certbot
          volumes:
            - ./data/nginx/ssl:/etc/letsencrypt
            - ./data/nginx/certbot:/var/www/certbot
          command: certonly --webroot --webroot-path=/var/www/certbot --keep --agree-tos --rsa-key-size 4096 --email my-email@gmail.com --no-eff-email -d my-domain.com
      
      networks:
        espocrm-network:
          driver: bridge
      espocrm.conf
      Code:
      charset utf-8;
      index index.html index.php;
      
      client_max_body_size 50M;
      
      keepalive_timeout 300;
      types_hash_max_size 2048;
      
      server_tokens off;
      fastcgi_send_timeout 300;
      fastcgi_read_timeout 300;
      
      gzip on;
      gzip_types text/plain text/css text/javascript application/javascript application/json;
      gzip_min_length 1000;
      gzip_comp_level 9;
      
      location = /favicon.ico { access_log off; log_not_found off; }
      location = /robots.txt  { access_log off; log_not_found off; }
      
      location ~ \.php$ {
          fastcgi_pass espocrm:9000;
          include fastcgi_params;
          fastcgi_index index.php;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_param QUERY_STRING    $query_string;
      }
      
      location /api/v1/ {
          if (!-e $request_filename){
              rewrite ^/api/v1/(.*)$ /api/v1/index.php last; break;
          }
      }
      
      location /portal/ {
          try_files $uri $uri/ /portal/index.php?$query_string;
      }
      
      location /api/v1/portal-access {
          if (!-e $request_filename){
              rewrite ^/api/v1/(.*)$ /api/v1/portal-access/index.php last; break;
          }
      }
      
      location ^~ (data|api)/ {
          if (-e $request_filename){
              return 403;
          }
      }
      
      location ~ /(\.ht|\web.config|\.git) {
          deny all;
      }
      default.conf.template
      Code:
      server {
          listen 80 default_server;
          listen [::]:80 default_server;
      
          server_name ${NGINX_HOST};
      
          root /var/www/html/public;
      
          location /client {
              root /var/www/html;
              autoindex off;
      
              location ~* ^.+.(js|css|png|jpg|jpeg|gif|ico|tpl)$ {
                  access_log off;
                  expires max;
              }
          }
      
          include /etc/nginx/espocrm.conf;
      }

      Comment

      Working...