unbreak mount permissions on linux

This commit is contained in:
Matthew Hodgson
2024-11-06 17:45:54 +00:00
parent 058b1761b7
commit 09f9dddf57
9 changed files with 20 additions and 0 deletions

View File

@@ -7,6 +7,10 @@
# n.b. SECRETS_* env variables get pulled in on demand from files in ./secrets # n.b. SECRETS_* env variables get pulled in on demand from files in ./secrets
# XXX: how do we interpolate this in?
USER_ID=
GROUP_ID=
VOLUME_PATH=. VOLUME_PATH=.
DOMAIN=example.com DOMAIN=example.com
HOMESERVER_FQDN=matrix.$DOMAIN HOMESERVER_FQDN=matrix.$DOMAIN

View File

@@ -1,4 +1,5 @@
# FIXME: define a frontend & backend network, and only expose backend services to the frontend (nginx) # FIXME: define a frontend & backend network, and only expose backend services to the frontend (nginx)
networks: networks:
backend: backend:
@@ -18,6 +19,7 @@ services:
# dependencies for optionally generating default configs + secrets # dependencies for optionally generating default configs + secrets
generate-synapse-secrets: generate-synapse-secrets:
image: ghcr.io/element-hq/synapse:latest image: ghcr.io/element-hq/synapse:latest
user: $USER_ID:$GROUP_ID
restart: "no" restart: "no"
volumes: volumes:
- ${VOLUME_PATH}/data/synapse:/data:rw - ${VOLUME_PATH}/data/synapse:/data:rw
@@ -33,6 +35,7 @@ services:
generate-mas-secrets: generate-mas-secrets:
restart: "no" restart: "no"
image: ghcr.io/element-hq/matrix-authentication-service:latest image: ghcr.io/element-hq/matrix-authentication-service:latest
user: $USER_ID:$GROUP_ID
volumes: volumes:
- ${VOLUME_PATH}/data/mas:/data:rw - ${VOLUME_PATH}/data/mas:/data:rw
# FIXME: stop this regenerating a spurious default config every time # FIXME: stop this regenerating a spurious default config every time
@@ -42,6 +45,7 @@ services:
# dependency for templating /data-template into /data (having extracted any secrets from any default generated configs) # dependency for templating /data-template into /data (having extracted any secrets from any default generated configs)
init: init:
build: init build: init
user: $USER_ID:$GROUP_ID
restart: "no" restart: "no"
volumes: volumes:
- ${VOLUME_PATH}/secrets:/secrets - ${VOLUME_PATH}/secrets:/secrets
@@ -58,6 +62,7 @@ services:
nginx: nginx:
image: nginx:latest image: nginx:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
ports: ports:
- "80:80" - "80:80"
@@ -99,6 +104,7 @@ services:
postgres: postgres:
image: postgres:latest image: postgres:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ${VOLUME_PATH}/data/postgres:/var/lib/postgresql/data:rw - ${VOLUME_PATH}/data/postgres:/var/lib/postgresql/data:rw
@@ -123,6 +129,7 @@ services:
redis: redis:
image: redis:latest image: redis:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
# healthcheck: # healthcheck:
# test: ["CMD-SHELL", "redis-cli ping | grep PONG"] # test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
@@ -134,6 +141,7 @@ services:
synapse: synapse:
image: ghcr.io/element-hq/synapse:latest image: ghcr.io/element-hq/synapse:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ${VOLUME_PATH}/data/synapse:/data:rw - ${VOLUME_PATH}/data/synapse:/data:rw
@@ -157,6 +165,7 @@ services:
synapse-generic-worker-1: synapse-generic-worker-1:
image: ghcr.io/element-hq/synapse:latest image: ghcr.io/element-hq/synapse:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/synapse-generic-worker-1.yaml"] entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/synapse-generic-worker-1.yaml"]
healthcheck: healthcheck:
@@ -182,6 +191,7 @@ services:
synapse-federation-sender-1: synapse-federation-sender-1:
image: ghcr.io/element-hq/synapse:latest image: ghcr.io/element-hq/synapse:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/synapse-federation-sender-1.yaml"] entrypoint: ["/start.py", "run", "--config-path=/data/homeserver.yaml", "--config-path=/data/workers/synapse-federation-sender-1.yaml"]
healthcheck: healthcheck:
@@ -202,6 +212,7 @@ services:
mas: mas:
image: ghcr.io/element-hq/matrix-authentication-service:latest image: ghcr.io/element-hq/matrix-authentication-service:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
# ports: # ports:
# - 8083:8080 # - 8083:8080
@@ -221,6 +232,7 @@ services:
# as a basic local MTA # as a basic local MTA
mailhog: mailhog:
image: mailhog/mailhog:latest image: mailhog/mailhog:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
ports: ports:
- 8025:8025 - 8025:8025
@@ -230,6 +242,7 @@ services:
element-web: element-web:
image: vectorim/element-web:latest image: vectorim/element-web:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
# ports: # ports:
# - 8080:80 # - 8080:80
@@ -248,6 +261,7 @@ services:
element-call: element-call:
image: ghcr.io/element-hq/element-call image: ghcr.io/element-hq/element-call
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
# ports: # ports:
# - 8082:80 # - 8082:80
@@ -261,6 +275,7 @@ services:
livekit: livekit:
image: livekit/livekit-server:latest image: livekit/livekit-server:latest
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ${VOLUME_PATH}/data/livekit/config.yaml:/etc/livekit.yaml - ${VOLUME_PATH}/data/livekit/config.yaml:/etc/livekit.yaml
@@ -295,6 +310,7 @@ services:
FROM alpine:latest FROM alpine:latest
RUN apk update && apk add bash RUN apk update && apk add bash
COPY --from=builder /lk-jwt-service / COPY --from=builder /lk-jwt-service /
user: $USER_ID:$GROUP_ID
restart: unless-stopped restart: unless-stopped
volumes: volumes:
- ${VOLUME_PATH}/data/nginx/ssl/rootCA.pem:/etc/ssl/certs/ca-certificates.crt - ${VOLUME_PATH}/data/nginx/ssl/rootCA.pem:/etc/ssl/certs/ca-certificates.crt

View File

View File

0
data/livekit/config.yaml Normal file
View File

0
data/mas/.gitkeep Normal file
View File

View File

0
data/postgres/.gitkeep Normal file
View File

0
data/synapse/.gitkeep Normal file
View File