Uptime Kuma - fix DB und cleanup (#2484)
Co-authored-by: gOOvER <116325+gOOvER@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									547d0e0d0b
								
							
						
					
					
						commit
						8a71caf41f
					
				@ -22,3 +22,22 @@ Uptime Kuma requires 1 port. You can choose any port you want
 | 
				
			|||||||
| Port    | default       |
 | 
					| Port    | default       |
 | 
				
			||||||
|---------|---------------|
 | 
					|---------|---------------|
 | 
				
			||||||
| default |     3000      |
 | 
					| default |     3000      |
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Cloudflared, Apprise & Chromium
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The latest image provides support for Cloudflared and Apprise.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Cloudflared
 | 
				
			||||||
 | 
					With Cloudflared it is possible to create a proxy over Cloudflare without having to use an nginx proxy. More info here:
 | 
				
			||||||
 | 
					https://github.com/louislam/uptime-kuma/wiki/Reverse-Proxy-with-Cloudflare-Tunnel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Apprise
 | 
				
			||||||
 | 
					Apprise provides notifications for all kinds of services. Uptime Kuma has a built-in support for Apprise.
 | 
				
			||||||
 | 
					More info's here:
 | 
				
			||||||
 | 
					https://github.com/caronc/apprise#supported-notifications
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Monitor HTTP(s) - Browser Engine (Chromium) 
 | 
				
			||||||
 | 
					The image supports the monitor "HTTP(s) - Browser Engine". 
 | 
				
			||||||
 | 
					To use this monitor, enter the following path in the settings under "General -> Chrome/Chromium Executable" (at the bottom):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/usr/bin/chromium-browser
 | 
				
			||||||
@ -4,7 +4,7 @@
 | 
				
			|||||||
        "version": "PTDL_v2",
 | 
					        "version": "PTDL_v2",
 | 
				
			||||||
        "update_url": null
 | 
					        "update_url": null
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "exported_at": "2023-09-25T18:09:50+02:00",
 | 
					    "exported_at": "2023-10-01T10:06:16+02:00",
 | 
				
			||||||
    "name": "Uptime Kuma",
 | 
					    "name": "Uptime Kuma",
 | 
				
			||||||
    "author": "info@goover.de",
 | 
					    "author": "info@goover.de",
 | 
				
			||||||
    "description": "Uptime Kuma is an easy-to-use self-hosted monitoring tool.",
 | 
					    "description": "Uptime Kuma is an easy-to-use self-hosted monitoring tool.",
 | 
				
			||||||
@ -13,7 +13,7 @@
 | 
				
			|||||||
        "ghcr.io\/parkervcp\/apps:uptimekuma": "ghcr.io\/parkervcp\/apps:uptimekuma"
 | 
					        "ghcr.io\/parkervcp\/apps:uptimekuma": "ghcr.io\/parkervcp\/apps:uptimekuma"
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "file_denylist": [],
 | 
					    "file_denylist": [],
 | 
				
			||||||
    "startup": "if [[ -d .git ]] && [[ {{AUTO_UPDATE}} == \"1\" ]]; then git pull; fi; if [[ ! -z ${NODE_PACKAGES} ]]; then \/usr\/local\/bin\/npm install ${NODE_PACKAGES}; fi; if [[ ! -z ${UNNODE_PACKAGES} ]]; then \/usr\/local\/bin\/npm uninstall ${UNNODE_PACKAGES}; fi; if [ -f \/home\/container\/package.json ]; then \/usr\/local\/bin\/npm install; fi; \/usr\/local\/bin\/node \/home\/container\/{{JS_FILE}} --port={{SERVER_PORT}}",
 | 
					    "startup": "node \/home\/container\/server\/server.js --port={{SERVER_PORT}}",
 | 
				
			||||||
    "config": {
 | 
					    "config": {
 | 
				
			||||||
        "files": "{}",
 | 
					        "files": "{}",
 | 
				
			||||||
        "startup": "{\r\n    \"done\": \"[SERVER] INFO: Listening on \"\r\n}",
 | 
					        "startup": "{\r\n    \"done\": \"[SERVER] INFO: Listening on \"\r\n}",
 | 
				
			||||||
@ -22,7 +22,7 @@
 | 
				
			|||||||
    },
 | 
					    },
 | 
				
			||||||
    "scripts": {
 | 
					    "scripts": {
 | 
				
			||||||
        "installation": {
 | 
					        "installation": {
 | 
				
			||||||
            "script": "#!\/bin\/ash\r\n# Uptime Kuma App Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napk update\r\napk add --no-cache git curl jq file unzip make gcc g++ python3 python3-dev libtool\r\n\r\nnpm install -g npm@latest\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nif [ \"${USER_UPLOAD}\" == \"true\" ] || [ \"${USER_UPLOAD}\" == \"1\" ]; then\r\n    echo -e \"assuming user knows what they are doing have a good day.\"\r\n    exit 0\r\nfi\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n    GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\nif [ -z \"${USERNAME}\" ] && [ -z \"${ACCESS_TOKEN}\" ]; then\r\n    echo -e \"using anon api call\"\r\nelse\r\n    GIT_ADDRESS=\"https:\/\/${USERNAME}:${ACCESS_TOKEN}@$(echo -e ${GIT_ADDRESS} | cut -d\/ -f3-)\"\r\nfi\r\n\r\n## pull git js repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n    echo -e \"\/mnt\/server directory is not empty.\"\r\n    if [ -d .git ]; then\r\n        echo -e \".git directory exists\"\r\n        if [ -f .git\/config ]; then\r\n            echo -e \"loading info from git config\"\r\n            ORIGIN=$(git config --get remote.origin.url)\r\n        else\r\n            echo -e \"files found with no git config\"\r\n            echo -e \"closing out without touching things to not break anything\"\r\n            exit 10\r\n        fi\r\n    fi\r\n\r\n    if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n        echo \"pulling latest from github\"\r\n        git pull\r\n    fi\r\nelse\r\n    echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n    if [ -z ${BRANCH} ]; then\r\n        echo -e \"cloning default branch\"\r\n        git clone ${GIT_ADDRESS} .\r\n    else\r\n        echo -e \"cloning ${BRANCH}'\"\r\n        git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n    fi\r\n\r\nfi\r\n\r\necho \"Installing nodejs packages\"\r\nif [[ ! -z ${NODE_PACKAGES} ]]; then\r\n    \/usr\/local\/bin\/npm install ${NODE_PACKAGES}\r\nfi\r\n\r\nif [ -f \/mnt\/server\/package.json ]; then\r\n    \/usr\/local\/bin\/npm install --production\r\nfi\r\n\r\n## add below your custom commands if needed\r\n\r\ncd \/mnt\/server\r\nnpm ci --production \r\nnpm run download-dist\r\n\r\n## install end\r\necho -e \"-----------------------------------------\"\r\necho -e \"Installation completed...\"\r\necho -e \"-----------------------------------------\"\r\nexit 0",
 | 
					            "script": "#!\/bin\/ash\r\n# Uptime Kuma App Installation Script\r\n#\r\n# Server Files: \/mnt\/server\r\napk update\r\napk add --no-cache git curl jq file unzip make gcc g++ python3 python3-dev libtool\r\n\r\nif [ -d \"\/mnt\/server\/node_modules\" ]; then\r\n    rm -fR \/mnt\/server\/node_modules\r\n    npm cache verify\r\nfi\r\n\r\nnpm install -g npm@latest\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\n## add git ending if it's not on the address\r\nif [[ ${GIT_ADDRESS} != *.git ]]; then\r\n    GIT_ADDRESS=${GIT_ADDRESS}.git\r\nfi\r\n\r\n## pull git js repo\r\nif [ \"$(ls -A \/mnt\/server)\" ]; then\r\n    echo -e \"\/mnt\/server directory is not empty.\"\r\n    if [ -d .git ]; then\r\n        echo -e \".git directory exists\"\r\n        if [ -f .git\/config ]; then\r\n            echo -e \"loading info from git config\"\r\n            ORIGIN=$(git config --get remote.origin.url)\r\n        else\r\n            echo -e \"files found with no git config\"\r\n            echo -e \"closing out without touching things to not break anything\"\r\n            exit 10\r\n        fi\r\n    fi\r\n\r\n    if [ \"${ORIGIN}\" == \"${GIT_ADDRESS}\" ]; then\r\n        echo \"pulling latest from github\"\r\n        git pull\r\n    fi\r\nelse\r\n    echo -e \"\/mnt\/server is empty.\\ncloning files into repo\"\r\n    if [ -z ${BRANCH} ]; then\r\n        echo -e \"cloning default branch\"\r\n        git clone ${GIT_ADDRESS} .\r\n    else\r\n        echo -e \"cloning ${BRANCH}'\"\r\n        git clone --single-branch --branch ${BRANCH} ${GIT_ADDRESS} .\r\n    fi\r\n\r\nfi\r\n\r\n## add below your custom commands if needed\r\ncd \/mnt\/server\r\nmkdir -p \/mnt\/server\/data\r\ngit config --global --add safe.directory \/mnt\/server\r\n\r\nnpm run setup\r\n\r\nif [ ! -f \"\/mnt\/server\/data\/kuma.db\" ]; then\r\n    cp \/mnt\/server\/db\/kuma.db \/mnt\/server\/data\/kuma.db\r\nfi\r\n\r\n## install end\r\necho -e \"-----------------------------------------\"\r\necho -e \"Installation completed...\"\r\necho -e \"-----------------------------------------\"\r\nexit 0",
 | 
				
			||||||
            "container": "node:18-alpine",
 | 
					            "container": "node:18-alpine",
 | 
				
			||||||
            "entrypoint": "ash"
 | 
					            "entrypoint": "ash"
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -38,16 +38,6 @@
 | 
				
			|||||||
            "rules": "nullable|string",
 | 
					            "rules": "nullable|string",
 | 
				
			||||||
            "field_type": "text"
 | 
					            "field_type": "text"
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            "name": "Auto Update",
 | 
					 | 
				
			||||||
            "description": "Pull the latest files on startup when using a GitHub repo.",
 | 
					 | 
				
			||||||
            "env_variable": "AUTO_UPDATE",
 | 
					 | 
				
			||||||
            "default_value": "1",
 | 
					 | 
				
			||||||
            "user_viewable": true,
 | 
					 | 
				
			||||||
            "user_editable": true,
 | 
					 | 
				
			||||||
            "rules": "required|boolean",
 | 
					 | 
				
			||||||
            "field_type": "text"
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            "name": "JS file",
 | 
					            "name": "JS file",
 | 
				
			||||||
            "description": "The file that starts the app",
 | 
					            "description": "The file that starts the app",
 | 
				
			||||||
@ -57,26 +47,6 @@
 | 
				
			|||||||
            "user_editable": false,
 | 
					            "user_editable": false,
 | 
				
			||||||
            "rules": "required|string",
 | 
					            "rules": "required|string",
 | 
				
			||||||
            "field_type": "text"
 | 
					            "field_type": "text"
 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            "name": "Additional Node packages",
 | 
					 | 
				
			||||||
            "description": "Install additional node packages.\r\n\r\nUse spaces to separate.",
 | 
					 | 
				
			||||||
            "env_variable": "NODE_PACKAGES",
 | 
					 | 
				
			||||||
            "default_value": "",
 | 
					 | 
				
			||||||
            "user_viewable": false,
 | 
					 | 
				
			||||||
            "user_editable": false,
 | 
					 | 
				
			||||||
            "rules": "nullable|string",
 | 
					 | 
				
			||||||
            "field_type": "text"
 | 
					 | 
				
			||||||
        },
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            "name": "Uninstall Node packages",
 | 
					 | 
				
			||||||
            "description": "Uninstall node packages.\r\n\r\nUse spaces to separate.",
 | 
					 | 
				
			||||||
            "env_variable": "UNNODE_PACKAGES",
 | 
					 | 
				
			||||||
            "default_value": "",
 | 
					 | 
				
			||||||
            "user_viewable": false,
 | 
					 | 
				
			||||||
            "user_editable": false,
 | 
					 | 
				
			||||||
            "rules": "nullable|string",
 | 
					 | 
				
			||||||
            "field_type": "text"
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    ]
 | 
					    ]
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user