In a mess while refactor!
This commit is contained in:
@ -1,40 +1 @@
|
||||
DropShell Template Example - Nginx simple webserver
|
||||
|
||||
A simple service example, creating a single docker container running nginx, with contant on the host
|
||||
in the configurable LOCAL_DATA_FOLDER directory.
|
||||
|
||||
Shell scripts defined in this folder are run as DropShell commands on the remote server (not locally!).
|
||||
|
||||
When they are run, the following environment variables will be set:
|
||||
- SERVER (server name), SERVICE (service name) and CONFIG_PATH (path to the user's service configuration folder)
|
||||
- everything in _default.env
|
||||
- everything in the server's particular service.env file (defaults in example/service.env)
|
||||
|
||||
The optional backup and restore scripts get two additional arguments, which are the backup file to create/restore
|
||||
(must be a single tgz file), and an empty temporary directory on the server which automatically gets cleaned up.
|
||||
|
||||
Mandatory scripts are:
|
||||
- install.sh (installs, or if already installed updates - non-destructive)
|
||||
- uninstall.sh (preserves data)
|
||||
- nuke.sh (deletes all data)
|
||||
|
||||
Optional standard scripts are:
|
||||
- start.sh
|
||||
- stop.sh
|
||||
- backup.sh
|
||||
- restore.sh
|
||||
- status.sh
|
||||
- ports.sh
|
||||
- logs.sh
|
||||
|
||||
|
||||
The example/ folder gets copied to the service's configuration, edited for the particular server settings,
|
||||
then copied onto the server. The location is server-specific, but can be accessed via CONFIG_PATH.
|
||||
|
||||
You can use it to store things like an nginx config file (this simple example does not).
|
||||
|
||||
The example/.template_info.env must contain the TEMPLATE= definition, which must match the template folder name
|
||||
(in this case 'example-nginx').
|
||||
|
||||
You can start a new template with the command:
|
||||
dropshell create-template <TEMPLATE_NAME>
|
||||
Caddy
|
||||
|
Reference in New Issue
Block a user