Git Product home page Git Product logo

Comments (2)

bensulli avatar bensulli commented on September 27, 2024

I think I may finally have it working, though requiring a fair bit of deviation from documentation:

  1. git clone https://github.com/mattermost/mattermost-docker.git
  2. Modify the docker-compose to pull postgres from docker hub, rather than building it locally from the mattermost repo
  3. Run mkdir -pv ./volumes/app/mattermost/{data,logs,config,plugins,client-plugins}
  4. Run sudo chown -R 1000:1000 ./volumes/app/mattermost/ (change 1001 to your uid/gid if different)
  5. docker-compose up --build
  6. Once it's up and accessible, shut it down
  7. Modify the config.json in volumes/app/mattermost/config with a siteurl and smtp, if needed
  8. docker-compose up -d

My current docker file (with some items obfuscated)

version: "3"

services:

  db:
    image: postgres
    restart: unless-stopped
    volumes:
      - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
      - /etc/localtime:/etc/localtime:ro
    environment:
      - POSTGRES_USER=mmuser
      - POSTGRES_PASSWORD=password
      - POSTGRES_DB=mattermost

  app:
    build:
      context: app
      args:
         - PUID=1001
         - PGID=1001
    restart: unless-stopped
    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=password
      - MM_DBNAME=mattermost
      - MM_SQLSETTINGS_DATASOURCE=postgres://mmuser:password@db:5432/mattermost?sslmode=disable&connect_timeout=10

  web:
    build: web
    ports:
      - "13531:8080"
    read_only: true
    restart: unless-stopped
    volumes:
      # This directory must have cert files if you want to enable SSL
      - ./volumes/web/cert:/cert:ro
      - /etc/localtime:/etc/localtime:ro
    cap_drop:
      - ALL

All that said, I'm not closing the issue, because if the above is an acceptable way to run Mattermost according to the maintainers, it should be documented somewhere.

It's also very problematic that things like siteurl seemingly can't be configured as environment variables in the docker-compose file. The deploy fails with numerous errors if I define a MM_SERVICESETTINGS_SITEURL in docker-compose.

from mattermost-docker.

Kukks avatar Kukks commented on September 27, 2024

Hey there, we have something in this repo that we use in production: https://github.com/btcpayserver/btcpayserver-infra

from mattermost-docker.

Related Issues (20)

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.