Comments (16)
I managed to make it work with Traefik.
$ docker -v
Docker version 20.10.13, build a224086
$ docker-compose -v
docker-compose version 1.29.2, build unknown
$ docker exec -it traefik traefik version
Version: 2.5.4
Codename: livarot
Go version: go1.17.3
Built: 2021-11-08T17:41:41Z
OS/Arch: linux/amd64
Usage with Traefik
---
version: '3.8'
services:
mysql:
image: mysql:8
container_name: mysql
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: espocrm
MYSQL_USER: espocrm
MYSQL_PASSWORD: database_password
volumes:
- mysql:/var/lib/mysql
restart: always
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://${DOMAIN}"
volumes:
- espocrm:/var/www/html
restart: always
labels:
- traefik.enable=true
- traefik.docker.network=traefik_public
- traefik.http.routers.espocrm-app.rule=Host(`${DOMAIN}`)
- traefik.http.routers.espocrm-app.entrypoints=https
- traefik.http.routers.espocrm-app.tls=true
- traefik.http.routers.espocrm-app.tls.certresolver=letsencrypt
espocrm-daemon:
image: espocrm/espocrm
container_name: espocrm-daemon
volumes:
- 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: "wss://${DOMAIN}/ws"
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
entrypoint: docker-websocket.sh
labels:
- traefik.enable=true
- traefik.docker.network=traefik_public
- traefik.http.routers.espocrm-ws.rule=Host(`${DOMAIN}`) && PathPrefix(`/ws`)
- traefik.http.routers.espocrm-ws.entrypoints=https
- traefik.http.routers.espocrm-ws.tls=true
- traefik.http.routers.espocrm-ws.tls.certresolver=letsencrypt
- traefik.http.routers.espocrm-ws.service=espocrm-ws-service
- traefik.http.services.espocrm-ws-service.loadbalancer.server.port=8080
volumes:
mysql:
espocrm:
networks:
default:
name: traefik_public
external: true
from espocrm-docker.
Please check if you have specified traefik.docker.network: proxy
.
What error do you have in traefik dashboard?
from espocrm-docker.
Thank you for your response. There is no error either traefik and docker-compose log. I connect to the container and checked to the apache server status and it is working. I couldn't find a problem to solve because I couldn't see an error message. Where am I doing wrong? I can serve on ip without using traefik, but I want to serve over domain with traefik
from espocrm-docker.
You can try to mount the /etc/apache2/sites-available/000-default.conf
where define your domain name espocrm.mydomain.com
.
from espocrm-docker.
My /etc/apache2/sites-available/000-default.conf file. After I update the file I reload the apache server and it still doesn't work.
<VirtualHost *:80>
ServerName espocrm.mydomain.com
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
from espocrm-docker.
This container of EspoCRM uses the php-apache image. Do you any other containers with the apache and PHP?
from espocrm-docker.
If you mean in that server has any container of apache server it doesn’t.
from espocrm-docker.
Ok, thanks.
Here is EspoCRM an example for traefik v1 with let's encrypt:
version: '3'
networks:
http_network:
external: true
internal_network:
external: false
services:
espocrm.domain.com:
container_name: "espocrm.domain.com"
image: espocrm/espocrm:latest
volumes:
- ./espocrm/html:/var/www/html
- ./espocrm/logs:/var/log/apache2
restart: always
labels:
- traefik.enable=true
- traefik.frontend.rule=Host:espocrm.domain.com
- traefik.docker.network=http_network
- traefik.frontend.redirect.entryPoint=https
depends_on:
- traefik
- mysqlserver
networks:
- internal_network
- http_network
from espocrm-docker.
The sample you sent is not possible to work even in theory. Where is the environments even if it is using default variable where do you put the domain in Apache Server. If you do not specify the domain name it will throw error like 'Set the 'ServerName' directive globally to suppress this message'. The only docker image that I can not run with traefik. I put so much effort to figure out how the espocrm server work but I didn't find yet.
from espocrm-docker.
I'm very busy right now. I will try to create a configuration for Traefik v2 in 2 weeks and let you know.
from espocrm-docker.
Thank you for your response. I’m waiting for it.
from espocrm-docker.
I'm taking a look at this now, and will post any solutions I come up with (or if y'all have already got this configured, I'd be happy to see it!)
from espocrm-docker.
Sorry, still is an issue :/ .
from espocrm-docker.
Hi, no one has a solution for Espo behind Traefik?
Possibly install 2 different Espocrm and point 2 different IPs and use the same mysql?
from espocrm-docker.
Well, it worked like a charm. Thank you so much. I just change a little. I made mysql internal cause I have more than one mysql in my server.
For mysql:
networks:
- proxy
For espocrm
networks:
- espocrm
- proxy
And I removed this line
- traefik.docker.network=traefik_public
from espocrm-docker.
@arkadywtf you are my good! 2 days I try to make somethink like this
I test your file with portainer stack and it work! this i a great solution.
I have last request , do you think is possible install 2 different espocrm (2 completly different installation for 2 different company with other 2 domain) that have same mysql and add phpmyadmin?
Another possibility is create another stack like this one (tomorrow I'll test)
Thanks too much
Fabio
from espocrm-docker.
Related Issues (20)
- LDAP Authentication issues HOT 3
- Can't enable "Use Cache" HOT 3
- espocrm-daemon exited with code 0 HOT 3
- database port HOT 2
- Deployment via Kubernetes HOT 1
- Some PDF's can't be opened HOT 3
- Apple Silicon Support HOT 1
- Bug: Jobs Run in Parallel not compatible with 7.3.2 HOT 2
- Websocket zmq not working with reverse proxy HOT 12
- Helm chart for kubernetes deployment
- How does 'charset' end up NULL in data/config-internal.php by default? HOT 1
- Set debug logging through Config Environments HOT 1
- Missing releases for 8.0.3 and 8.0.4 HOT 1
- SMTP configuration in docker-compose environment ? HOT 6
- PostgreSQL support broken HOT 1
- Missing releases HOT 1
- Unable to upgrade 8.06 to 8.1.4 HOT 1
- Please add docker label `org.opencontainers.image.source` HOT 1
- About Scheduled Jobs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from espocrm-docker.