Fix permissions for meshcentral container

This commit is contained in:
Joel DeTeves
2022-01-16 22:46:49 -08:00
parent 44418ef295
commit 4c06da0646
3 changed files with 5 additions and 3 deletions

View File

@@ -18,9 +18,6 @@ set -e
: "${SMTP_PASS:=mesh-smtp-pass}"
: "${SMTP_TLS:=false}"
mkdir -p /home/node/app/meshcentral-data
mkdir -p ${TACTICAL_DIR}/tmp
if [ ! -f "/home/node/app/meshcentral-data/config.json" ] || [[ "${MESH_PERSISTENT_CONFIG}" -eq 0 ]]; then
encoded_uri=$(node -p "encodeURI('mongodb://${MONGODB_USER}:${MONGODB_PASSWORD}@${MONGODB_HOST}:${MONGODB_PORT}')")

View File

@@ -37,7 +37,11 @@ if [ "$1" = 'tactical-init' ]; then
# copy container data to volume
rsync -a --no-perms --no-owner --delete --exclude "tmp/*" --exclude "certs/*" --exclude="api/tacticalrmm/private/*" "${TACTICAL_TMP_DIR}/" "${TACTICAL_DIR}/"
mkdir -p /home/node/app/meshcentral-data
mkdir -p ${TACTICAL_DIR}/tmp
touch /home/node/app/meshcentral-data/.initialized && chown -R 1000:1000 /home/node/app/meshcentral-data
touch ${TACTICAL_DIR}/tmp/.initialized && chown -R 1000:1000 ${TACTICAL_DIR}
mkdir -p ${TACTICAL_DIR}/tmp && chown -R 1000:1000 ${TACTICAL_DIR}
mkdir -p ${TACTICAL_DIR}/api/tacticalrmm/private/exe
mkdir -p ${TACTICAL_DIR}/api/tacticalrmm/private/log
touch ${TACTICAL_DIR}/api/tacticalrmm/private/log/django_debug.log

View File

@@ -68,6 +68,7 @@ services:
- proxy
volumes:
- tactical_data:/opt/tactical
- mesh_data:/home/node/app/meshcentral-data
# nats
tactical-nats: