mirror of
https://github.com/QYG2297248353/appstore-1panel.git
synced 2024-11-24 17:55:10 +08:00
发布应用 Synapse
Signed-off-by: Meng Sen <qyg2297248353@gmail.com>
This commit is contained in:
parent
38f65c3471
commit
4af374a18b
@ -1,5 +1,12 @@
|
||||
additionalProperties:
|
||||
formFields:
|
||||
- default: "/home/synapse"
|
||||
edit: true
|
||||
envKey: SYNAPSE_ROOT_PATH
|
||||
labelZh: 数据持久化路径
|
||||
labelEn: Data persistence path
|
||||
required: true
|
||||
type: text
|
||||
- default: 8008
|
||||
edit: true
|
||||
envKey: PANEL_APP_PORT_HTTP
|
||||
|
@ -3,6 +3,23 @@ networks:
|
||||
external: true
|
||||
|
||||
services:
|
||||
synapse-init:
|
||||
image: matrixdotorg/synapse:v1.118.0
|
||||
container_name: synapse-init
|
||||
entrypoint: >
|
||||
/bin/sh -c "
|
||||
if [ ! -f /data/homeserver.yaml ]; then
|
||||
python3 -m synapse.app.homeserver --server-name ${SYNAPSE_SERVER_NAME} --config-path /data/homeserver.yaml --generate-config
|
||||
fi
|
||||
"
|
||||
environment:
|
||||
- SYNAPSE_SERVER_NAME=${DOMAIN_NAME}
|
||||
- SYNAPSE_REPORT_STATS=no
|
||||
volumes:
|
||||
- ${SYNAPSE_ROOT_PATH}/data:/data
|
||||
networks:
|
||||
- 1panel-network
|
||||
restart: no
|
||||
synapse:
|
||||
image: matrixdotorg/synapse:v1.118.0
|
||||
container_name: ${CONTAINER_NAME}
|
||||
@ -17,4 +34,6 @@ services:
|
||||
- /etc/1panel/envs/global.env
|
||||
- ${ENV_FILE:-/etc/1panel/envs/default.env}
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ${SYNAPSE_ROOT_PATH}/data:/data
|
||||
depends_on:
|
||||
- synapse-init
|
||||
|
@ -8,18 +8,6 @@ if [ -f .env ]; then
|
||||
sed -i '/^ENV_FILE=/d' .env
|
||||
echo "ENV_FILE=${CURRENT_DIR}/.env" >> .env
|
||||
|
||||
# setup-2 generate key
|
||||
mkdir -p "${CURRENT_DIR}/data"
|
||||
docker run -it --rm \
|
||||
-v "${CURRENT_DIR}/data":/data \
|
||||
-e SYNAPSE_SERVER_NAME="${DOMAIN_NAME}" \
|
||||
-e SYNAPSE_REPORT_STATS=no \
|
||||
-e TZ=Asia/Shanghai \
|
||||
matrixdotorg/synapse:latest generate
|
||||
|
||||
# setup-3 check permission
|
||||
chmod -R 777 "${CURRENT_DIR}/data"
|
||||
|
||||
echo "Check Finish."
|
||||
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user