This repository was archived by the owner on Dec 21, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathegg-caddy-php.json
More file actions
50 lines (50 loc) · 4.59 KB
/
Copy pathegg-caddy-php.json
File metadata and controls
50 lines (50 loc) · 4.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v1",
"update_url": null
},
"exported_at": "2022-02-28T21:06:39+01:00",
"name": "Caddy PHP",
"author": "contact@lazybytez.de",
"description": "Fast, multi-platform web server with automatic HTTPS paired with PHP-FPM to provide the possibility to host PHP powered services.\r\nNote: Doesn't support crons. Initialization tasks can be done through a preflight script.",
"features": null,
"images": [
"ghcr.io\/lazybytez\/custom-eggs:php_8.1",
"ghcr.io\/lazybytez\/custom-eggs:php_8.1_composer1",
"ghcr.io\/lazybytez\/custom-eggs:php_8.0",
"ghcr.io\/lazybytez\/custom-eggs:php_8.0_composer1",
"ghcr.io\/lazybytez\/custom-eggs:php_7.4",
"ghcr.io\/lazybytez\/custom-eggs:php_7.4_composer1",
"ghcr.io\/lazybytez\/custom-eggs:php_7.3",
"ghcr.io\/lazybytez\/custom-eggs:php_7.3_composer1",
"ghcr.io\/lazybytez\/custom-eggs:php_7.2",
"ghcr.io\/lazybytez\/custom-eggs:php_7.2_composer1"
],
"file_denylist": [],
"startup": ".\/.runtime\/start.sh",
"config": {
"files": "{\r\n \".runtime\/caddy\/Caddyfile\": {\r\n \"parser\": \"file\",\r\n \"find\": {\r\n \"{{PTERODACTYL_PORT}}\": \":{{server.build.default.port}} {\"\r\n }\r\n }\r\n}",
"startup": "{\r\n \"done\": \"serving initial configuration\"\r\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": "#!\/bin\/sh\r\n# Switch to mounted directory\r\ncd \/mnt\/server\r\n# Cleanup previous install if available\r\nfind . -maxdepth 1 ! -name \"prestart.sh\" ! -name \"www\" ! -name \"logs\" ! -name . -exec rm -rf {} \\;\r\n# Download and extract Caddy\r\nif [ ! -d \".runtime\/caddy\" ]; then mkdir -p .runtime\/caddy; fi\r\nversion=${CADDY_VERSION}\r\nif [ \"$version\" = \"latest\" ]; then version=$(curl --silent \"https:\/\/api.github.com\/repos\/caddyserver\/caddy\/releases\/latest\" | grep '\"tag_name\":' | sed -E 's\/.*\"([^\"]+)\".*\/\\1\/' | cut -c2-); fi\r\ncurl -L https:\/\/github.com\/caddyserver\/caddy\/releases\/download\/v${version}\/caddy_${version}_linux_amd64.tar.gz --output caddy.tar.gz\r\ntar -zxvf caddy.tar.gz -C .runtime\/caddy\r\nrm -rf caddy.tar.gz\r\n# Create default files and directories if not present\r\n# Create Caddy and startup files\r\nif [ ! -f \".runtime\/caddy\/Caddyfile\" ]; then curl -L https:\/\/raw.githubusercontent.com\/lazybytez\/custom-eggs\/master\/eggs\/caddy-php\/config\/caddy\/Caddyfile --output .runtime\/caddy\/Caddyfile; fi\r\nif [ ! -f \".runtime\/caddy\/.env\" ]; then curl -L https:\/\/raw.githubusercontent.com\/lazybytez\/custom-eggs\/master\/eggs\/caddy-php\/config\/caddy\/.env --output .runtime\/caddy\/.env; fi\r\nif [ ! -f \"prestart.sh\" ]; then curl -L https:\/\/raw.githubusercontent.com\/lazybytez\/custom-eggs\/master\/eggs\/caddy-php\/config\/prestart.sh --output prestart.sh; fi\r\nif [ ! -f \".runtime\/start.sh\" ]; then curl -L https:\/\/raw.githubusercontent.com\/lazybytez\/custom-eggs\/master\/eggs\/caddy-php\/config\/start.sh --output .runtime\/start.sh; fi\r\n# Configure PHP\r\nif [ ! -d \".runtime\/php\/proc\" ]; then mkdir -p .runtime\/php\/proc; fi\r\nif [ ! -f \".runtime\/php\/fpm.conf\" ]; then curl -L https:\/\/raw.githubusercontent.com\/lazybytez\/custom-eggs\/master\/eggs\/caddy-php\/config\/\/php\/fpm.conf --output .runtime\/php\/fpm.conf; fi\r\nif [ ! -f \".runtime\/php\/www.conf\" ]; then curl -L https:\/\/raw.githubusercontent.com\/lazybytez\/custom-eggs\/master\/eggs\/caddy-php\/config\/php\/www.conf --output .runtime\/php\/www.conf; fi\r\nif [ ! -f \".runtime\/php\/php.ini\" ]; then curl -L https:\/\/raw.githubusercontent.com\/lazybytez\/custom-eggs\/master\/eggs\/caddy-php\/config\/php\/php.ini --output .runtime\/php\/php.ini; fi\r\n# Create data dirs\r\nif [ ! -d \"www\" ]; then mkdir www; fi\r\nif [ ! -d \"logs\" ]; then mkdir logs; fi\r\n# Set permissions for executables\r\nchmod +x .runtime\/start.sh\r\nchmod +x prestart.sh",
"container": "ghcr.io\/pterodactyl\/installers:alpine",
"entrypoint": "ash"
}
},
"variables": [
{
"name": "Caddy Version",
"description": "The version of Caddy to install. By default the latest version is being installed.",
"env_variable": "CADDY_VERSION",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:20"
}
]
}