GithubHelp home page GithubHelp logo

espocrm / espocrm-docker Goto Github PK

View Code? Open in Web Editor NEW
54.0 8.0 33.0 212 KB

Official Docker Image for EspoCRM

Home Page: https://hub.docker.com/r/espocrm/espocrm

License: GNU Affero General Public License v3.0

Dockerfile 7.57% Shell 92.43%
docker docker-image crm espocrm

espocrm-docker's Introduction

Official Docker Image for EspoCRM

This repository is the official Docker image for EspoCRM.

Article map:

Usage

Use a prebuilt version for a production instance, https://hub.docker.com/r/espocrm/espocrm.

version: '3.8'

services:

  espocrm-db:
    image: mariadb:latest
    container_name: espocrm-db
    environment:
      MARIADB_ROOT_PASSWORD: root_password
      MARIADB_DATABASE: espocrm
      MARIADB_USER: espocrm
      MARIADB_PASSWORD: database_password
    volumes:
      - espocrm-db:/var/lib/mysql
    restart: always

  espocrm:
    image: espocrm/espocrm
    container_name: espocrm
    environment:
      ESPOCRM_DATABASE_PLATFORM: Mysql
      ESPOCRM_DATABASE_HOST: espocrm-db
      ESPOCRM_DATABASE_USER: espocrm
      ESPOCRM_DATABASE_PASSWORD: database_password
      ESPOCRM_ADMIN_USERNAME: admin
      ESPOCRM_ADMIN_PASSWORD: password
      ESPOCRM_SITE_URL: "http://localhost:8080"
    volumes:
      - espocrm:/var/www/html
    restart: always
    depends_on:
      - espocrm-db
    ports:
      - 8080:80

  espocrm-daemon:
    image: espocrm/espocrm
    container_name: espocrm-daemon
    volumes:
      - espocrm:/var/www/html
    restart: always
    depends_on:
      - espocrm
    entrypoint: docker-daemon.sh

  espocrm-websocket:
    image: espocrm/espocrm
    container_name: espocrm-websocket
    environment:
      ESPOCRM_CONFIG_USE_WEB_SOCKET: "true"
      ESPOCRM_CONFIG_WEB_SOCKET_URL: "ws://localhost:8081"
      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:
      - espocrm:/var/www/html
    restart: always
    depends_on:
      - espocrm
    entrypoint: docker-websocket.sh
    ports:
      - 8081:8080

volumes:
  espocrm:
  espocrm-db:

Run docker compose up -d, wait for it to initialize completely, and visit http://localhost:8080.

Legacy Usage (EspoCRM v6.1.7 and earlier)

version: '3.1'

services:

  mysql:
    container_name: mysql
    image: mysql:8
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
    volumes:
      - mysql:/var/lib/mysql

  espocrm:
    container_name: espocrm
    image: espocrm/espocrm
    environment:
      ESPOCRM_DATABASE_PASSWORD: example
      ESPOCRM_ADMIN_USERNAME: admin
      ESPOCRM_ADMIN_PASSWORD: password
      ESPOCRM_SITE_URL: "http://localhost:8080"
    restart: always
    ports:
      - 8080:80
    volumes:
     - espocrm:/var/www/html

  espocrm-cron:
    image: espocrm/espocrm
    volumes:
     - espocrm:/var/www/html
    restart: always
    entrypoint: docker-cron.sh

volumes:
  mysql:
  espocrm:

Usage (only for development)

Example docker-compose.yml:

version: '3.1'

services:

  mysql:
    container_name: mysql
    image: mysql:8
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example
    volumes:
      - mysql:/var/lib/mysql

  espocrm:
    container_name: espocrm
    build:
      context: ./apache
      dockerfile: Dockerfile
    environment:
      ESPOCRM_DATABASE_PASSWORD: example
      ESPOCRM_ADMIN_USERNAME: admin
      ESPOCRM_ADMIN_PASSWORD: password
      ESPOCRM_SITE_URL: "http://localhost:8080"
    restart: always
    ports:
      - 8080:80
    volumes:
     - espocrm:/var/www/html

  espocrm-daemon:
    container_name: espocrm-daemon
    build:
      context: ./apache
      dockerfile: Dockerfile
    volumes:
     - espocrm:/var/www/html
    restart: always
    entrypoint: docker-daemon.sh

volumes:
  mysql:
  espocrm:

Upgrading

In order to upgrade EspoCRM instance created by the docker-compose.yml:

  1. Open your docker-compose.yml directory.
  2. Run the command:
$ docker compose pull && docker compose up -d

Documentation

Documentation for administrators, users and developers is available here.

License

EspoCRM is published under the GNU AGPLv3 license.

espocrm-docker's People

Contributors

laurentgoderre avatar lazespo avatar sourcecodes2 avatar tmachyshyn avatar xlyz avatar yurikuzn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

espocrm-docker's Issues

Suggestions for handling config.php with Dockerized EspoCRM

Could you provide feedback on best practices for managing data/config.php with a docker build of EspoCRM?

This file contains configuration that needs to be persisted across a cluster of web nodes, for example, tabList and smtp settings, therefore I would like to track the file in our git repo and include it in our build of the app, but doing this with the stock docker image causes the Espo installation process to fail because the installer thinks that the app has already been installed if this file is present. Also config.php contains values like siteUrl that should not be baked into the image since it needs to be per environment.

How does 'charset' end up NULL in data/config-internal.php by default?

As discovered in this issue: espocrm/espocrm#2758

In my last 5 instances of deploying EspoCRM using the docker implementation,data/config-internal.php ended up with charset being stored as NULL which then broke emojis across the board. Error 500 and then in the log:

ERROR: (HY000) SQLSTATE[HY000]: General error: 1366 Incorrect string value:

Posting this here for myself unless someone answers it and corrects the implementation before me.

Helm chart for kubernetes deployment

Is your feature request related to a problem? Please describe.
I want to deploy EspoCRM in a local kubernetes cluster, but there is no official helm chart.

Describe the solution you'd like
This would be solved by providing an official helm chart.

About Scheduled Jobs

【Add this line to the crontab file to run Espo Scheduled Jobs】:What does this note mean?

Is it for me to manually add [* * * * * cd /var/www/html; /usr/local/bin/php -f cron.php > /dev/null 2>&1] in the crontab of the operating system?

Or it has no other meaning, just an example。

External database

Hello,

We want to migrate our espocrm from standard installation to docker version but I have some questions about this [the default docker-compose it's working fine with mysql container].

  1. How can I connect to another mysql server? [not container]
  2. Atm in the current server we have a folder mounted from the main storage
    [/var/www/html/epsocrm/data/upload]
    How can I mount this folder directly into the container because we have lots (30k+ documents).

With this config I'm getting Error 500.

version: '3.1'

services:
  espocrm:
    container_name: espocrm
    image: espocrm/espocrm
    environment:
      ESPOCRM_DATABASE_HOST: 192.168.3.107
      ESPOCRM_DATABASE_NAME: crm
      ESPOCRM_DATABASE_USER: crm
      ESPOCRM_DATABASE_PASSWORD: 123456
      ESPOCRM_ADMIN_USERNAME: admin
      ESPOCRM_ADMIN_PASSWORD: password
      ESPOCRM_SITE_URL: "http://localhost:8080"
    restart: always
    ports:
      - 8282:80
    volumes:
     - ./data:/var/www/html
     - ./docs:/var/www/html/epsocrm/data/upload

  espocrm-daemon:
    image: espocrm/espocrm
    volumes:
     - ./data:/var/www/html
    restart: always
    entrypoint: docker-daemon.sh

volumes:
  espocrm:

Thank you.

Building behind web proxies

Thanks for the official Docker repository. I wrap all our gitlab CI/CD around this repo as a git submodule. The only issue I ran into was the use of git:// when cloning php-zmq in the Docker build script when running behind a web proxy. I was able to get around this by replacing git:// with https:// in the deployment script after checkout.

Missing releases

Hello,

Similar to #29, latest releases are not available via DockerHub (8.1.1 → 8.1.3)

As a workaround, I can trigger the upgrade manually in the container via docker exec -i espocrm php bin/command upgrade -y

Regards.

Missing releases for 8.0.3 and 8.0.4

The docker tags for releases 8.0.3 and 8.0.4 have not been published yet. Will they be published or are users expected to build their own images as of 8.0.3?

LDAP authentication

EspoCRM 6.1.10, and 6.1.9

LDAP authentication not working in Docker Hub image. LDAP Authentication working fine when I build using...

docker-compose.yml

image: crm-webapp:${espo_version}
build:
  context: ./docker/apache
  dockerfile: Dockerfile

CI job

- cd ./docker/apache
- docker build --no-cache -t crm-webapp:${espo_version} -f Dockerfile .

Ldap authentication has been working for multiple versions. I wanted to switch to Docker Hub image. When trying to use docker hub image authentication will not work. I can easily swap in/out docker hub image and going from working to not working and vice versa. Here was the image I tried...

docker-compose.yml

image: espocrm/espocrm:6.1.10-apache

I'm not sure what the differences are/or if you are missing ldap libraries in the docker hub version.

Apple Silicon Support

According to this conversation with Yuri I found out missing arm64 arch support I've tried to create own docker image for arm64 but I've stuck with PhantomJS missing binary, but problem has probably gone espocrm/espocrm#2538

I need arm64 need for dockerization of dev env

espocrm-daemon exited with code 0

Hello,

After upgrading to 7.1.7 from 7.0.10, the espocrm-daemon it's in restarting loop with this error:
espocrm-daemon exited with code 0
2022-06-21_15-52

After the update we get:

Attaching to espocrm, espocrm-daemon
espocrm         | Run "upgrade" action.
espocrm         | Start upgrading process from version 7.0.10.
espocrm         | Upgrade process is finished. EspoCRM version is 7.1.7.

But the daemon it's in a restarting loop.

It's there a path to make the update to the latest version ?

Thank you.

Scheduled Jobs don't work after update

Today we update the espocrm from 6.1.9 to 7.0.4 but the Scheduled Jobs don't work anymore.

  1. EspoCRM 6.1.9
  2. docker-compose down
  3. docker-compose pull
  4. docker-compose up -d --force-recreate
  5. It takes ~10 minute to update to last version
  6. Scheduled Jobs isn't working after the last update.

All Scheduled Jobs don't work after the update.

Before update: 6.1.9
After update: 7.0.4
EspoCRM it's installed in docker container with external database

I need to add the cron in the container or it's bug ?
Screenshot from 2021-10-14 20-17-09

in logs /var/www/html/data/logs I can see this:

[2021-10-14 17:15:08] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:15:18] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:15:28] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:15:38] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:15:48] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:15:58] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:16:08] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:16:18] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:16:28] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:16:38] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:16:48] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:16:58] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:17:08] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:17:18] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:17:28] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:17:38] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:17:48] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:17:58] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:18:08] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:18:23] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:18:28] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:18:38] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:18:48] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:18:58] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:19:08] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:19:18] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:19:28] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []
[2021-10-14 17:19:38] WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []

It's a param. in the docker-compose or somewhere else?

Thank you.

Unable to upgrade 8.06 to 8.1.4

I am running EspoCRM on docker via Portainer. I've had a working system for quite a while, I've made no recent changes. Today I went to upgrade the stack from from 8.0.6 to 8.1.4. Simple process- go to the stack, stop it, re-pull updated images from the repository and re-deploy.
Logs show "upgrading from 8.06" for 45 minutes with no apparent activity. Exec

Run "upgrade" action. Start upgrading process from version 8.0.6. PHP Warning: require(/var/www/html/vendor/composer/../../application/Espo/Resources/defaults/tcpdf-config.php): Failed to open stream: No such file or directory in /var/www/html/vendor/composer/autoload_real.php on line 53 PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/vendor/composer/../../application/Espo/Resources/defaults/tcpdf-config.php' (include_path='/var/www/html') in /var/www/html/vendor/composer/autoload_real.php:53 Stack trace: #0 /var/www/html/vendor/composer/autoload_real.php(36): composerRequire81e67dd04e1d26db73a6b9676f976909('618029bee273295...', '/var/www/html/v...') #1 /var/www/html/vendor/autoload.php(25): ComposerAutoloaderInit81e67dd04e1d26db73a6b9676f976909::getLoader() #2 /var/www/html/bootstrap.php(33): require_once('/var/www/html/v...') #3 /var/www/html/command.php(30): include('/var/www/html/b...') #4 {main} thrown in /var/www/html/vendor/composer/autoload_real.php on line 53

This is a repeated error until the max upgrade counter limit is reached. The system is not usable at all. I deleted the containers and tried again- same errors. But this time, Apache will "resume normal operations" but the client's still down. Attempts to access it prompt the same error:

[Fri Mar 01 17:39:28.350972 2024] [php:error] [pid 111] [client 10.2.140.1:58672] PHP Fatal error: Uncaught Error: Failed opening required '/var/www/html/vendor/composer/../../application/Espo/Resources/defaults/tcpdf-config.php' (include_path='/var/www/html') in /var/www/html/vendor/composer/autoload_real.php:53\nStack trace:\n#0 /var/www/html/vendor/composer/autoload_real.php(36): composerRequire81e67dd04e1d26db73a6b9676f976909('618029bee273295...', '/var/www/html/v...')\n#1 /var/www/html/vendor/autoload.php(25): ComposerAutoloaderInit81e67dd04e1d26db73a6b9676f976909::getLoader()\n#2 /var/www/html/bootstrap.php(33): require_once('/var/www/html/v...')\n#3 /var/www/html/public/index.php(30): include('/var/www/html/b...')\n#4 {main}\n thrown in /var/www/html/vendor/composer/autoload_real.php on line 53

Deployment via Kubernetes

Hello Team,

Thanks for packaging this together. I have tried using the docker directly on Kubernetes but its not been working no matter what I do.

this is an example of my statefulset but its returning 504 error when I try to access the service

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: watuespocrm
  labels:
    tier: backend
spec:
  replicas: 1
  serviceName: "watuespocrm"
  selector:
    matchLabels:
      app: watuespocrm
  template:
    metadata:
      labels:
        app: watuespocrm
    spec:
      containers:
        - name: watu-espocrm
          image: espocrm/espocrm:fpm-alpine
          ports:
            - containerPort: 80
              name: http
          volumeMounts:
            - name: espo-crm-volume
              mountPath: "/var/www/html"
          env:
            - name: ESPOCRM_DATABASE_HOST
              value: ${DB_HOST}:${DB_PORT}
            - name: ESPOCRM_DATABASE_USER
              value: ${DB_USERNAME}
            - name: ESPOCRM_DATABASE_PASSWORD
              value: ${DB_PASSWORD}
            - name: ESPOCRM_ADMIN_USERNAME
              value: "admin"
            - name: ESPOCRM_ADMIN_PASSWORD
              value: "adminPassword"
            - name: ESPOCRM_SITE_URL
              value: "https://espocrm.watu.global"
        - name: watu-espocrm-daemon
          image: espocrm/espocrm:fpm-alpine
          volumeMounts:
            - mountPath: "/var/www/html"
              name: "espo-crm-volume"
          command: ["docker-daemon.sh"]
        - name: watu-espocrm-websocket
          image: espocrm/espocrm:fpm-alpine
          ports:
            - containerPort: 8080
          volumeMounts:
            - mountPath: "/var/www/html"
              name: "espo-crm-volume"
          command: ["docker-websocket.sh"]
      restartPolicy: Always
  volumeClaimTemplates:
    - metadata:
        name: espo-crm-volume
      spec:
        accessModes:
          - ReadWriteOnce
        resources:
          requests:
            storage: 5Gi
        storageClassName: do-block-storage

Cronjob not working

I've set up Espo pretty almost exactly like you in your example docker-compose.
Unfortunatly, I can't get the cronjob to work. Here's the part of my docker compose

  # CRM
  crm-db:
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - ./data/crm/db:/var/lib/mysql
    env_file:
      - crm.env
    networks:
      - crm

  crm:
    build: ./crm
    restart: always
    volumes:
      - ./data/crm/system:/var/www/html
    depends_on:
      - crm-db
    networks:
      - crm

  crm-cron:
    build: ./crm
    restart: always
    volumes:
      - ./data/crm/system:/var/www/html
    depends_on:
      - crm
    networks:
      - crm
    entrypoint: docker-cron.sh

I'm using the Dockerfile and docker-entrypoint.sh, docker-cron.sh from the apache folder.
As there are different settings for the local and production environment, there are more configs publishing the port or hiding behind a reverse proxy.

I'm trying to fetch mails. When I run docker exec -it webapps_crm_1 /bin/bash and then php cron.php in the /var/www/html directory, emails are fetched as it should. However, the cron service doesn't do this job.

Is there anything I'm missing?

Can't enable "Use Cache"

Hi,

After updating espocrm from 7.0.4 to 7.0.7, we can't enable "Use Cache" in Settings.
Screenshot from 2021-10-21 09-49-59

I don't know if it was enable or disable before (on 7.0.4) but on 6.1.9 it was 100% enable use cache.

What we're using:

  • Docker version 20.10.9, build c2ea9bc
  • docker-compose version 1.29.2, build 5becea4c
  • espocrm v 7.0.7
  • AlmaLinux release 8.4 (Electric Cheetah)

I get this error in logs:

[2021-10-20 14:45:56] ERROR: (500) Error while clearing cache; PUT /Settings/1; line: 132, file: /var/www/html/application/Espo/Core/DataManager.php [] []
[2021-10-20 14:46:04] WARNING: E_WARNING: unlink(data/cache/application/cronLastRunTime.php): Permission denied {"code":2,"message":"unlink(data/cache/application/cronLastRunTime.php): Permission denied","file":"/var/www/html/application/E
spo/Core/Utils/File/Manager.php","line":755} []
[2021-10-20 14:46:04] ERROR: (500) Error while clearing cache; PUT /Settings/1; line: 132, file: /var/www/html/application/Espo/Core/DataManager.php [] []
[2021-10-20 14:47:54] WARNING: E_WARNING: unlink(data/cache/application/cronLastRunTime.php): Permission denied {"code":2,"message":"unlink(data/cache/application/cronLastRunTime.php): Permission denied","file":"/var/www/html/application/E
spo/Core/Utils/File/Manager.php","line":755} []
[2021-10-20 14:47:54] ERROR: (500) Error while clearing cache; PUT /Settings/1; line: 132, file: /var/www/html/application/Espo/Core/DataManager.php [] []
[2021-10-20 14:50:14] WARNING: E_WARNING: unlink(data/cache/application/cronLastRunTime.php): Permission denied {"code":2,"message":"unlink(data/cache/application/cronLastRunTime.php): Permission denied","file":"/var/www/html/application/E
spo/Core/Utils/File/Manager.php","line":755} []

I tried to chown data/cache/application/cronLastRunTime.php from root to apache but it'll overwrite again to root.

Thank you.

PostgreSQL support broken

PostgreSQL support is currently broken due to no system libraries or PDO drivers installed inside the Debian or Alpine images.

espocrm-postgresql

Required libraries:

  • Debian: libpq-dev
  • Alpine: postgresql-dev

Required PHP extension:

  • pdo_pgsql

Created pull request #31 with fixes for all images.

CLA signed

Bug: Jobs Run in Parallel not compatible with 7.3.2

Release: 7.3.2 in Docker.

I updated from 7.2.7 to 7.3.2 and found that no Scheduled Jobs were running (Check Group Email Accounts & Run Scheduled Workflows specifically).

Issues subsided after un-checking : Job Settings > "Jobs Run in Parallel"

In html/data/logs is:

WARNING: Cron is not run because it's disabled with 'cronDisabled' param. [] []

ERROR: Uncaught Exception Spatie\Async\Output\ParallelError: "PHP Deprecated: Opis\Closure\SerializableClosure implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /var/www/html/vendor/opis/closure/src/SerializableClosure.php on line 18 " at /var/www/html/vendor/spatie/async/src/Output/ParallelError.php line 11 {"exception":"[object] (Spatie\\Async\\Output\\ParallelError(code: 0): PHP Deprecated: Opis\\Closure\\SerializableClosure implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /var/www/html/vendor/opis/closure/src/SerializableClosure.php on line 18\n at /var/www/html/vendor/spatie/async/src/Output/ParallelError.php:11)"} []

May have something todo with dropping PHP 7.4 support in release 7.3.0?

Related? espocrm/espocrm#1283 & Forum Post

It would be nice to be able to use "Jobs run in parallel" as it sounds like it is highly recommended.

Some PDF's can't be opened

Describe the bug
We can't see some documents (PDF's with 5MB+). The upload it's fine but the app can't open it.
Error we get 403 Forbidden.

To Reproduce
Steps to reproduce the behavior:

  1. Go to Documents
  2. Add Document
  3. Select a 'big' PDF 5MB+
  4. Try to see the PDF.

Expected behavior
To see all the documents (bigger or smaller).

Screenshots
2022-10-05_09-40
2022-10-05_09-41

EspoCRM version
EspoCRM Version 7.2.4 in docker container with external database.

Additional context
Both documents (1 and 2 from SS) are the same.
The first one it's a smaller copy from the second one.
The first document I can open.
The second document I can't open.

I get this in logs:

[2022-10-05 06:25:03] ERROR: (403) GET /; line: 85, file: /var/www/html/application/Espo/EntryPoints/Download.php [] []
[2022-10-05 06:25:13] ERROR: (403) GET /; line: 85, file: /var/www/html/application/Espo/EntryPoints/Download.php [] []
[2022-10-05 06:32:30] ERROR: (403) GET /; line: 85, file: /var/www/html/application/Espo/EntryPoints/Download.php [] []
[2022-10-05 06:33:12] ERROR: (403) GET /; line: 85, file: /var/www/html/application/Espo/EntryPoints/Download.php [] []
[2022-10-05 06:33:24] ERROR: (403) GET /; line: 85, file: /var/www/html/application/Espo/EntryPoints/Download.php [] []

In settings:

  • Upload Max Size (Mb): 256
  • Upload Chink Size (Mb): 4

So the size should not be a problem.

Thank you.

Traefik integration

How can we use with traefik reverse proxy

I'm using all of my apps with Traefik. I setup my docker compose file but it didn't worked for espocrm docker-compose.yml file.
So if I missed anything can you guys help me out.
My docker-compose.yml file down below.
`
version: '3.8'

services:

mysql:
image: mysql:8
container_name: mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: espocrm
MYSQL_USER: espocrm
MYSQL_PASSWORD: database_password
command: --default-authentication-plugin=mysql_native_password
networks:
- espocrm
volumes:
- /storage/espocrm/mysql:/var/lib/mysql
labels:
- "traefik.enable=false"

espocrm:
image: espocrm/espocrm
container_name: espocrm
environment:
ESPOCRM_DATABASE_HOST: mysql
ESPOCRM_DATABASE_USER: espocrm
ESPOCRM_DATABASE_PASSWORD: database_password
ESPOCRM_ADMIN_USERNAME: admin
ESPOCRM_ADMIN_PASSWORD: password
ESPOCRM_SITE_URL: "https://espocrm.mydomain.com"
networks:
- espocrm
- proxy
volumes:
- /storage/espocrm:/var/www/html
labels:
- "traefik.enable=true"
- "traefik.http.routers.espocrm.rule=Host(espocrm.mydomain.com)"
- "traefik.http.services.espocrm.loadbalancer.server.port=8080"
- "traefik.http.routers.espocrm.entrypoints=websecure"
- "traefik.http.routers.espocrm.tls=true"
- "traefik.http.routers.espocrm.tls.certresolver=cloudflare"
- "traefik.http.routers.espocrm.tls.domains[0].main=espocrm.mydomain.com"
restart: always
expose:
- 8080

espocrm-daemon:
image: espocrm/espocrm
container_name: espocrm-daemon
networks:
- espocrm
volumes:
- /storage/espocrm:/var/www/html
restart: always
entrypoint: docker-daemon.sh

espocrm-websocket:
image: espocrm/espocrm
container_name: espocrm-websocket
environment:
ESPOCRM_CONFIG_USE_WEB_SOCKET: "true"
ESPOCRM_CONFIG_WEB_SOCKET_URL: "ws://espocrm.mydomain.com"
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:
- /storage/espocrm:/var/www/html
networks:
- espocrm
restart: always
entrypoint: docker-websocket.sh
expose:
- 8081
- 7777

networks:
espocrm:
driver: bridge
proxy:
external:
name: "traefik_proxy"

volumes:
mysql:
espocrm:

`

LDAP/SSL: what location is checked for a CA cert?

Hello!

I test a docker installation of EspoCRM. When trying to connect to AD using encryption, I get an error:

>>> Error 500: 0x51 (Can't contact LDAP server; (unknown error code)): ldaps://SERVER:3269
Which means that the CRM couldn't find the CA cert of the AD server. Ok, I googled it and learned that laminas-ldap is used which in turn uses OpenLdap libraries. And here's the problem: there's no OpenLDAP traces in the containers at all (or I couldn't find any).

Then I tried to share the CA from the host to the ssl dir but to no avail:

     - espocrm:/var/www/html
     - /etc/openldap/certs/CA.cer:/etc/ssl/certs/CA.cer

If using the standart port (389) without encryption, everything works fine, so it's not AD's config problem.

So, how is cert checking realised in the docker version of EspoCRM? Or is it a bug?

Any help would be appreciated. Thanks.

Websocket zmq not working with reverse proxy

When using docker, either configuring everything manually with a regular setup or when using the install script, websocket is not working. Something seems to be missing from a regular setup using php. It seems nginx are not able to understans or translate the zmq and hence not becoming a socket. Instead only reaching the endpoint over http(s).

After spending countless hours on this I decided to cash up for a VM to try it outside my current hosting setup and came to the same conclusion result. Or I might be missing something fundamental, if so I'd love some help.

"auto-install" with ssh:

# MODE: letsencrypt
version: '3'
services:
 espocrm-mysql:
   image: mysql:8
   container_name: espocrm-mysql
   command: --default-authentication-plugin=mysql_native_password
   restart: always
   environment:
     MYSQL_ROOT_PASSWORD: pass
     MYSQL_DATABASE: espocrm
     MYSQL_USER: espocrm
     MYSQL_PASSWORD: pass
   volumes:
     - ./data/mysql/data:/var/lib/mysql
   networks:
     - internal

 espocrm-nginx:
   image: nginx
   container_name: espocrm-nginx
   restart: always
   depends_on:
     - espocrm
   volumes:
     - ./data/nginx/conf.d/:/etc/nginx/conf.d/
     - ./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
     - ./data/nginx/certbot:/var/www/certbot
   ports:
     - "80:80"
     - "443:443"
   command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'"
   networks:
     - external

 espocrm:
   image: espocrm/espocrm:fpm
   container_name: espocrm
   environment:
     ESPOCRM_DATABASE_HOST: espocrm-mysql
     ESPOCRM_DATABASE_USER: espocrm
     ESPOCRM_DATABASE_PASSWORD: pass
     ESPOCRM_ADMIN_USERNAME: admin
     ESPOCRM_ADMIN_PASSWORD: pass
     ESPOCRM_SITE_URL: "https://espocrm.domain.tld"
     ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBMISSION_DSN: "tcp://espocrm-websocket:7777"
   restart: always
   depends_on:
     - espocrm-mysql
   volumes:
    - ./data/espocrm:/var/www/html
   networks:
     - external
     - internal

 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:
     - external
     - internal

 espocrm-websocket:
   container_name: espocrm-websocket
   image: espocrm/espocrm:fpm
   environment:
     ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBSCRIBER_DSN: "tcp://*:7777"
     ESPOCRM_CONFIG_USE_WEB_SOCKET: "true"
   volumes:
    - ./data/espocrm:/var/www/html
   restart: always
   depends_on:
     - espocrm
   entrypoint: docker-websocket.sh
   ports:
     - 8080:8080
   networks:
     - external
     - internal

 espocrm-certbot:
   image: certbot/certbot
   container_name: espocrm-certbot
   restart: always
   volumes:
     - ./data/nginx/ssl:/etc/letsencrypt
     - ./data/nginx/certbot:/var/www/certbot
   entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
   networks:
     - external

networks:
 external:
   external: true
 internal:
   external: false

database port

Hello,

It is possible in docker compose insert other espo crm database port?

like this:
environment:
ESPOCRM_DATABASE_HOST: mysql
ESPOCRM_DATABASE_PORT: 3307
ESPOCRM_DATABASE_USER: espocrm

I see in data/config-internal.php:
'database' => [
'driver' => 'pdo_mysql',
'dbname' => 'YOUR_DATABASE_NAME',
'user' => 'YOUR_USER',
'password' => 'YOUR_DATABASE_PASSWORD',
'host' => 'localhost',
'port' => '',
],

Thank you.

SMTP configuration in docker-compose environment ?

It would be nice if we could add the outgoing mail / SMTP configuration in the environment for the docker-compose. Something like SMTP_HOST, SMTP_USER, SMTP_PASS, so this can be set here instead of having to configure it manually in the webgui.

Same thing with LDAP settings.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.