docker and install script fixes

This commit is contained in:
sadnub 2023-05-03 17:58:19 -04:00
parent 924774f52a
commit 57fc5ac088
4 changed files with 17 additions and 1 deletions

View File

@ -106,6 +106,7 @@ EOF
# run migrations and init scripts
"${VIRTUAL_ENV}"/bin/python manage.py pre_update_tasks
"${VIRTUAL_ENV}"/bin/python manage.py migrate --no-input
"${VIRTUAL_ENV}"/bin/python manage.py generate_json_schemas
"${VIRTUAL_ENV}"/bin/python manage.py collectstatic --no-input
"${VIRTUAL_ENV}"/bin/python manage.py initial_db_setup
"${VIRTUAL_ENV}"/bin/python manage.py initial_mesh_setup
@ -113,6 +114,7 @@ EOF
"${VIRTUAL_ENV}"/bin/python manage.py load_community_scripts
"${VIRTUAL_ENV}"/bin/python manage.py reload_nats
"${VIRTUAL_ENV}"/bin/python manage.py create_natsapi_conf
"${VIRTUAL_ENV}"/bin/python manage.py setup_reporting_permissions
"${VIRTUAL_ENV}"/bin/python manage.py create_installer_user
"${VIRTUAL_ENV}"/bin/python manage.py post_update_tasks
@ -131,6 +133,8 @@ if [ "$1" = 'tactical-init-dev' ]; then
mkdir -p /meshcentral-data
mkdir -p ${TACTICAL_DIR}/tmp
mkdir -p ${TACTICAL_DIR}/certs
mkdir -p ${TACTICAL_DIR}/reporting
mkdir -p ${TACTICAL_DIR}/reporting/assets
mkdir -p /mongo/data/db
mkdir -p /redis/data
touch /meshcentral-data/.initialized && chown -R 1000:1000 /meshcentral-data
@ -138,6 +142,7 @@ if [ "$1" = 'tactical-init-dev' ]; then
touch ${TACTICAL_DIR}/certs/.initialized && chown -R 1000:1000 ${TACTICAL_DIR}/certs
touch /mongo/data/db/.initialized && chown -R 1000:1000 /mongo/data/db
touch /redis/data/.initialized && chown -R 1000:1000 /redis/data
touch ${TACTICAL_DIR}/reporting && chown -R 1000:1000 ${TACTICAL_DIR}/reporting
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

@ -77,6 +77,7 @@ server {
location /static/ {
root ${TACTICAL_DIR}/api;
add_header "Access-Control-Allow-Origin" "https://${APP_HOST}";
}
location /private/ {
@ -100,6 +101,11 @@ server {
proxy_set_header X-Forwarded-Host \$server_name;
}
location /assets/ {
internal;
alias /opt/tactical/reporting/;
}
location ~ ^/natsws {
set \$natswebsocket http://${NATS_SERVICE}:9235;
proxy_pass \$natswebsocket;

View File

@ -40,6 +40,8 @@ if [ "$1" = 'tactical-init' ]; then
mkdir -p /meshcentral-data
mkdir -p ${TACTICAL_DIR}/tmp
mkdir -p ${TACTICAL_DIR}/certs
mkdir -p ${TACTICAL_DIR}/reporting
mkdir -p ${TACTICAL_DIR}/reporting/assets
mkdir -p /mongo/data/db
mkdir -p /redis/data
touch /meshcentral-data/.initialized && chown -R 1000:1000 /meshcentral-data
@ -47,6 +49,7 @@ if [ "$1" = 'tactical-init' ]; then
touch ${TACTICAL_DIR}/certs/.initialized && chown -R 1000:1000 ${TACTICAL_DIR}/certs
touch /mongo/data/db/.initialized && chown -R 1000:1000 /mongo/data/db
touch /redis/data/.initialized && chown -R 1000:1000 /redis/data
touch ${TACTICAL_DIR}/reporting && chown -R 1000:1000 ${TACTICAL_DIR}/reporting
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
@ -114,6 +117,7 @@ EOF
# run migrations and init scripts
python manage.py pre_update_tasks
python manage.py migrate --no-input
python manage.py generate_json_schemas
python manage.py collectstatic --no-input
python manage.py initial_db_setup
python manage.py initial_mesh_setup
@ -123,6 +127,7 @@ EOF
python manage.py create_natsapi_conf
python manage.py create_uwsgi_conf
python manage.py create_installer_user
python manage.py setup_reporting_permissions
python manage.py clear_redis_celery_locks
python manage.py post_update_tasks

View File

@ -521,12 +521,12 @@ pip install --no-cache-dir --upgrade pip
pip install --no-cache-dir setuptools==${SETUPTOOLS_VER} wheel==${WHEEL_VER}
pip install --no-cache-dir -r /rmm/api/tacticalrmm/requirements.txt
python manage.py migrate
python manage.py generate_json_schemas
python manage.py collectstatic --no-input
python manage.py create_natsapi_conf
python manage.py create_uwsgi_conf
python manage.py load_chocos
python manage.py load_community_scripts
python manage.py generate_json_schemas
python manage.py setup_reporting_permissions
WEB_VERSION=$(python manage.py get_config webversion)
printf >&2 "${YELLOW}%0.s*${NC}" {1..80}