Monogramm / docker-dolibarr

:whale: :elephant: Docker image for Dolibarr.
https://github.com/Dolibarr/dolibarr
GNU Affero General Public License v3.0
71 stars 23 forks source link

dolibarr traefik #35

Closed oda-alexandre closed 5 years ago

oda-alexandre commented 5 years ago

hello, I can not configure dolibarr with traefik here is my docker-compose

`version: '3.7'

services:

TRAEFIK

traefik

traefik: container_name: traefik image: traefik restart: always command: --web --docker --docker.domain=localhost volumes:

mysql

mysql: container_name: mysql image: mysql:5.7 restart: always

volumes:

#   - ${HOME}/mysql/etc:/etc/mysql
#   - ${HOME}/mysql/lib:/var/lib/mysql
environment:
  MYSQL_ROOT_PASSWORD: root
labels:
  - "traefik.enable=false"
networks:
  backend:

ERP

dolibarr

dolibarr: container_name: dolibarr image: monogramm/docker-dolibarr environment: DOLI_AUTO_CONFIGURE: 1 DOLI_DB_PORT: 3306 DOLI_DB_HOST: mysql DOLI_DB_USER: root DOLI_DB_PASSWORD: root

volumes:

#   - ${HOME}/nginx/html/dolibarr:/usr/share/nginx/html
labels:
  - "traefik.docker.network=traefik"
  - "traefik.backend=dolibarr"
  - "traefik.port=80"
  - "traefik.enable=true"
  - "traefik.frontend.entryPoints=http"
  - "traefik.frontend.rule=PathPrefixStrip:/dolibarr"
  ##
  # - "traefik.frontend.headers.SSLRedirect=true"
  # - "traefik.frontend.headers.STSSeconds=315360000"
  # - "traefik.frontend.headers.SSLHost=localhost"
  # - "traefik.frontend.headers.STSIncludeSubdomains=true"
  # - "traefik.frontend.headers.STSPreload=true"
  # - "traefik.frontend.headers.forceSTSHeader=true"
  # - "traefik.frontend.headers.browserXSSFilter=true"
  # - "traefik.frontend.headers.contentTypeNosniff=true"
  # - "traefik.frontend.headers.frameDeny=true"
networks:
  - backend
  - frontend
links:
  - mysql

RESEAU

networks:

traefik

backend:
  driver:              bridge

frontend:
  driver:              bridge`

http://myserver.com/dolibarr

Message: host=mysql, port=3306, user=dolibarr, databasename=dolibarr, Access denied for user 'dolibarr'@'172.20.0.7' (using password: NO)

madmath03 commented 5 years ago

Hello,

Well, I've never used traefik so I will probably just state the obvious and not be very helpful on this... Judging from your error message, your Dolibarr server cannot contact your MySQL database, meaning that something must be wrong with your traefik setup.

I cannot see anything wrong with your docker-compose but again, never used traefik before... I suggest you try to post your issue on a space related to traefik to get some help from them.

You can share the link here if you want. I will keep this issue opened for a while, even if your issue is clearly not related to this container.

oda-alexandre commented 5 years ago

thanks the problem is solved

madmath03 commented 5 years ago

@oda-alexandre Glad to hear you've been able to fix your problem.

Could you share how you were able to fix it and maybe share your configuration ? This might help others trying to setup traefik with Dolibarr.