-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Traefik integration #13
Comments
Please check if you have specified |
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 |
You can try to mount the |
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.
|
This container of EspoCRM uses the php-apache image. Do you any other containers with the apache and PHP? |
If you mean in that server has any container of apache server it doesn’t. |
Ok, thanks. Here is EspoCRM an example for traefik v1 with let's encrypt:
|
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. |
I'm very busy right now. I will try to create a configuration for Traefik v2 in 2 weeks and let you know. |
Thank you for your response. I’m waiting for it. |
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!) |
Sorry, still is an issue :/ . |
Hi, no one has a solution for Espo behind Traefik? |
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 |
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:
For espocrm
And I removed this line |
@arkadywtf you are my good! 2 days I try to make somethink like this |
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:
`
The text was updated successfully, but these errors were encountered: