update docker configuration
This commit is contained in:
parent
ac07f3c3dc
commit
a2ad9ea428
2 changed files with 36 additions and 3 deletions
23
Dockerfile
23
Dockerfile
|
@ -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 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
|
WORKDIR /app
|
||||||
COPY requirements.txt /app/requirements.txt
|
|
||||||
RUN pip install -r requirements.txt
|
STOPSIGNAL SIGINT
|
||||||
|
|
||||||
RUN mkdir /data
|
RUN mkdir /data
|
||||||
|
|
||||||
COPY matrix-invitation-dealer /app/matrix-invitation-dealer
|
COPY matrix-invitation-dealer /app/matrix-invitation-dealer
|
||||||
|
COPY sql /app/sql
|
||||||
COPY docker.env /app/.env
|
COPY docker.env /app/.env
|
||||||
|
|
||||||
CMD ["python3", "-m", "matrix-invitation-dealer"]
|
CMD ["python3", "-m", "matrix-invitation-dealer"]
|
||||||
|
|
|
@ -6,3 +6,19 @@ services:
|
||||||
network_mode: "host" # FIXME
|
network_mode: "host" # FIXME
|
||||||
volumes:
|
volumes:
|
||||||
- ./data:/data
|
- ./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"
|
||||||
|
|
Loading…
Reference in a new issue