{ "_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO", "meta": { "version": "PTDL_v2", "update_url": null }, "exported_at": "2022-06-30T20:27:13+02:00", "name": "gogs", "author": "josdekurk@gmail.com", "description": "A painless self-hosted Git service.", "features": null, "docker_images": { "ghcr.io\/parkervcp\/yolks:debian": "ghcr.io\/parkervcp\/yolks:debian" }, "file_denylist": [], "startup": ".\/gogs web --port {{SERVER_PORT}}", "config": { "files": "{\r\n \"\/custom\/conf\/app.ini\": {\r\n \"parser\": \"ini\",\r\n \"find\": {\r\n \"RUN_USER\": \"container\",\r\n \"[server].SSH_PORT\": \"{{server.build.env.SSH_PORT}}\",\r\n \"[server].HTTP_PORT\": \"{{server.build.default.port}}\",\r\n \"[server].START_SSH_SERVER\": \"{{server.build.env.SSH_SERVER_STATUS}}\",\r\n \"[log].MODE\": \"console, file\",\r\n \"[log].LEVEL\": \"Info\",\r\n \"[log].ROOT_PATH\": \"\/home\/container\/log\"\r\n }\r\n }\r\n}", "startup": "{\r\n \"done\": \"[ INFO] Listen on\"\r\n}", "logs": "{}", "stop": "^C" }, "scripts": { "installation": { "script": "#!\/bin\/bash\r\n#\r\n# Server Files: \/mnt\/server\r\n## install packages to get version and download links\r\napt update\r\napt install -y curl wget unzip git tar ca-certificates jq\r\n\r\nmkdir -p \/mnt\/server\r\ncd \/mnt\/server\r\n\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"armv8\")\r\nLATEST_JSON=$(curl --silent \"https:\/\/api.github.com\/repos\/gogs\/gogs\/releases\/latest\")\r\nRELEASES=$(curl --silent \"https:\/\/api.github.com\/repos\/gogs\/gogs\/releases\")\r\n\r\n\r\nif [ -z \"${VERSION}\" ] || [ \"${VERSION}\" == \"latest\" ]; then\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i linux_${ARCH}.tar.gz | head -1)\r\nelse\r\n VERSION_CHECK=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION)' | jq -r .tag_name)\r\n if [ \"${VERSION}\" == \"${VERSION_CHECK}\" ]; then\r\n DOWNLOAD_URL=$(echo ${RELEASES} | jq -r --arg VERSION \"${VERSION}\" '.[] | select(.tag_name==$VERSION)' | jq -r .assets[].browser_download_url | grep -i linux_${ARCH}.tar.gz | head -1)\r\n else\r\n echo -e \"defaulting to latest release\"\r\n DOWNLOAD_URL=$(echo ${LATEST_JSON} | jq .assets | jq -r .[].browser_download_url | grep -i linux_${ARCH}.tar.gz | head -1)\r\n fi\r\nfi\r\necho \"download url:\"\r\necho ${DOWNLOAD_URL}\r\necho \"arch\"\r\necho ${ARCH}\r\n\r\ncd \/tmp\r\ncurl -Lo gogs.tar.gz \"${DOWNLOAD_URL}\"\r\ntar -xvf gogs.tar.gz\r\nmv gogs\/* \/mnt\/server\r\n\r\nrm gogs.tar.gz\r\n\r\ncd \/mnt\/server\r\nchmod +x gogs\r\nmkdir -p \/mnt\/server\/custom\/conf\r\nmkdir -p \/mnt\/server\/custom\/https\r\nmkdir -p \/mnt\/server\/.ssh\r\nmkdir -p \/mnt\/server\/gogs-repositories\r\ntouch \/mnt\/server\/custom\/conf\/app.ini\r\ncd \/mnt\/server\/custom\/conf\r\ncat <> app.ini\r\nRUN_USER = container\r\nRUN_MODE = prod\r\n\r\n[repository]\r\nROOT = \/home\/container\/gogs-repositories\r\nEOT\r\necho 'done'", "container": "debian:buster-slim", "entrypoint": "bash" } }, "variables": [ { "name": "VERSION", "description": "The gogs version\r\n\r\nshould be latest or \"v0.x.x\"", "env_variable": "VERSION", "default_value": "latest", "user_viewable": true, "user_editable": true, "rules": "required|string|max:10", "field_type": "text" }, { "name": "SSH port", "description": "The port for the SSH server (currently does not work!)", "env_variable": "SSH_PORT", "default_value": "25572", "user_viewable": true, "user_editable": false, "rules": "required|integer|max:65535", "field_type": "text" }, { "name": "SSH server enabled?", "description": "Currently does not work!", "env_variable": "SSH_SERVER_STATUS", "default_value": "false", "user_viewable": true, "user_editable": true, "rules": "required|string|in:true,false", "field_type": "text" } ] }