crra / focalboard-native-docker

Mattermost's focalboard in a (native) docker container (including raspberry pi, ARM)
GNU Affero General Public License v3.0
7 stars 0 forks source link

Unable to deploy on my raspberry pi 3B+ #1

Open LoSunny opened 3 years ago

LoSunny commented 3 years ago

The focalboard instance crashes when it starts, here is the build & start logs: https://hastebin.com/yolopuqimi.yaml Config file

{
        "serverRoot": "http://localhost:8000",
        "port": 8000,
        "dbtype": "sqlite3",
        "dbconfig": "./data/focalboard.db",
        "postgres_dbconfig": "dbname=focalboard sslmode=disable",
        "test_dbconfig": "file::memory:?cache=shared",
        "useSSL": false,
        "webpath": "./pack",
        "filespath": "./files",
        "telemetry": false,
        "webhook_update": [],
        "secret": "wywWdQ3xA9vmmp3B",
        "session_expire_time": 2592000,
        "session_refresh_time": 18000,
        "localOnly": false,
        "enableLocalMode": true,
        "localModeSocketLocation": "/var/tmp/focalboard_local.socket",
        "authMode": "native",
        "mattermostURL": "",
        "mattermostClientID": "",
        "mattermostClientSecret": ""
}

docker-compose.yml. I had changed the version to 0.6.7 as it's the latest version

version: "3"
services:
  app:
    build:
      context: ./
      args:
        focalboard_version: 0.6.7
    container_name: focalboard
    ports:
      - 30008:8000
    environment:
      - VIRTUAL_HOST=focalboard.local
      - VIRTUAL_PORT=8000
    volumes:
      - "./config-sqlite.json:/opt/focalboard/config.json"
      - "./sqlite:/opt/focalboard/data"
      - "./files:/opt/focalboard/files"
plsnotracking commented 3 years ago

The Dockerfile seems to assume that the plugin version moves parallel to the focalboard server version, which doesn't seem to be the case.

As of today, the dockerfile should look something like this:

ARG GOLANG_BUILDER_IMAGE=golang:buster
ARG DIST_IMAGE=gcr.io/distroless/static

FROM ${GOLANG_BUILDER_IMAGE} as builder

ARG focalboard_version
ENV FOCALBOARD_VERSION=${focalboard_version}

WORKDIR /usr/src

RUN curl -L -o focalboard-bin.tgz https://github.com/mattermost/focalboard/releases/download/v0.7.0/focalboard-server-linux-amd64.tar.gz && \
    mkdir focalboard && \
    tar xzf focalboard-bin.tgz -C focalboard --strip-components=1

RUN curl -L -o focalboard-src.tgz "https://github.com/mattermost/focalboard/archive/refs/tags/v0.7.3.tar.gz" && \
    mkdir source && \
    tar xzf focalboard-src.tgz -C source --strip-components=1

RUN cd source && BUILD_NUMBER="0.7.0" LDFLAGS='-w -s -extldflags "-static"' make server
RUN cp source/bin/focalboard-server focalboard/bin

FROM ${DIST_IMAGE}

EXPOSE 8000

WORKDIR /opt/focalboard
COPY --from=builder /usr/src/focalboard .

ENTRYPOINT ["/opt/focalboard/bin/focalboard-server"]