update docker configuration

This commit is contained in:
bain 2023-10-13 20:42:44 +02:00
parent ac07f3c3dc
commit a2ad9ea428
Signed by: bain
GPG key ID: 31F0F25E3BED0B9B
2 changed files with 36 additions and 3 deletions

View file

@ -1,13 +1,30 @@
FROM python:3.10-alpine
FROM python:3.10-alpine as base
FROM base as builder
RUN apk update && apk add cmake olm make alpine-sdk
RUN mkdir /install
COPY requirements.txt /requirements.txt
RUN pip install --prefix=/install -r /requirements.txt
FROM base
RUN apk update && apk add olm
COPY --from=builder /install /usr/local
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
STOPSIGNAL SIGINT
RUN mkdir /data
COPY matrix-invitation-dealer /app/matrix-invitation-dealer
COPY sql /app/sql
COPY docker.env /app/.env
CMD ["python3", "-m", "matrix-invitation-dealer"]

View file

@ -6,3 +6,19 @@ services:
network_mode: "host" # FIXME
volumes:
- ./data:/data
environment:
# matrix credentials
MATRIX_HOMESERVER: "matrix.nolog.chat"
MATRIX_USER_ID: "@invite:nolog.chat"
MATRIX_USER_PASSWORD: "REDACTED"
# admin credentials
SYNAPSE_ADMIN_HOMESERVER: "http://127.0.0.1:8008"
SYNAPSE_ADMIN_ACCESS_TOKEN: "REDACTED"
# accept invites from users with the following suffix
USER_ID_SUFFIX: "nolog.chat"
# restrictions and quotas
USER_REQUIRED_AGE: "14d"
INVITE_CODE_QUOTA: "10/7d"