Mattermost, Inc.

HAProxy and Mattermost Set up with Docker

Hi,

i have the following configuration for the mattermost set up.

services:
  db:
	build: db
    read_only: true
    networks:
      - web-public
    restart: always
    volumes:
      - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
    environment:
      - POSTGRES_USER=mmuser
      - POSTGRES_PASSWORD=mmuser_password
      - POSTGRES_DB=mattermost

  app:
    build:
      context: app
      args:
         - edition=team
    restart: always
    networks:
      - web-public
    volumes:
      - ./volumes/app/mattermost/config:/mattermost/config:rw
      - ./volumes/app/mattermost/data:/mattermost/data:rw
      - ./volumes/app/mattermost/logs:/mattermost/logs:rw
      - ./volumes/app/mattermost/plugins:/mattermost/plugins:rw
      - ./volumes/app/mattermost/client-plugins:/mattermost/client/plugins:rw
      - /etc/localtime:/etc/localtime:ro
    environment:
      - MM_USERNAME=mmuser
      - MM_PASSWORD=mmuser_password
      - MM_DBNAME=mattermost
    links:
      - db:db

Furthermore I have a haproxy with the following entries:

acl host-mattermost hdr(host) -i mattermost.example.com
use-backend mattermost-http if host-mattermost
backend mattermost-http
  mode http
  server local-mattermost mattermost.web-public:80 cookie A check

The two containers start and they are also healthy, also in the logs there are no errors. But I can not reach the URL mattermost.example.com. I get 503 Service Unavailable
No server is available to handle this request.

Can anyone help me? Must I change something in my docker-compose.yml File?

Thank you!

Hi there, @darksyton

May I know if you notice anything from the database log since you mentioned that there aren’t any errors in the application log?

Additionally, were you able to pull more information from the web client if you enable the developer tools and check on Network tab to see if we can expand more on the 503 error we are seeing?

  • General
  • Response headers

Let me know how it goes. Thanks.