diff --git a/Dockerfile b/Dockerfile index 82c0f6e..d275386 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM golang:alpine as builder +ENV VERSION=120ae016a68c4b65cf443c9577c4d1741e34c8d0 + RUN apk --no-cache add \ git \ gcc \ @@ -8,6 +10,7 @@ RUN apk --no-cache add \ WORKDIR /build RUN git clone https://github.com/tulir/mautrix-whatsapp.git WORKDIR /build/mautrix-whatsapp +RUN git checkout $VERSION RUN go get RUN go build -o /build/bin/mautrix-whatsapp diff --git a/README.md b/README.md index 805ae74..4b44fad 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[whatsapp bridge](https://github.com/tulir/mautrix-whatsapp) for the [matrix](http://matrix.org/) network. +[whatsapp bridge](https://github.com/tulir/mautrix-whatsapp) +for the [matrix](http://matrix.org/) network. # Volumes - `/var/lib/matrix-bridge/data` @@ -19,5 +20,8 @@ Homeserver token (from the generated registration) ## ADMIN_USER Matrix id of the admin user. +## DATABASE_DATASOURCE +Postgre datasource url + # Ports - 8080 diff --git a/rootfs/etc/confd/templates/config.yaml.tmpl b/rootfs/etc/confd/templates/config.yaml.tmpl index 3d495ff..148d340 100644 --- a/rootfs/etc/confd/templates/config.yaml.tmpl +++ b/rootfs/etc/confd/templates/config.yaml.tmpl @@ -18,9 +18,9 @@ appservice: # Database config. database: # The database type. Only "sqlite3" is supported. - type: sqlite3 + type: postgres # The database URI. Usually file name. https://github.com/mattn/go-sqlite3#connection-string - uri: /var/lib/matrix-bridge/data/mautrix-whatsapp.db + uri: {{ DATABASE_DATASOURCE }} # Path to the Matrix room state store. state_store_path: /var/lib/matrix-bridge/data/mx-state.json