A small and simple script to help you install stuff on a server.
It isn't Debian packaging. It isn't Docker. It's really just to help me, a little bit.
sudo apt-get install \
libmodern-perl-perl \
libconfig-simple-perl \
libfile-slurp-perl \
libipc-run3-perl \
libjson-any-perl \
jq
Note that most of these steps are optional except 1-4 which are compulsory.
- checks it can get
sudo
- git fetch and rebase
- setup:
- creates "safe_name" from current dir name
- checks to see if
package.json
exists (thenis_node
istrue
)
- reads
deployer/settings
for apex/port/www/cmd - reads
deployer/env
- checks for
deployer/ENV_*
files - installs packages from
deployer/packages
(if exists) - runs
npm ci
as needed - makes the project is a
Makefile
exists (if exists) - minifies files in
deployer/minify
(if exists) - creates dirs in
deployer/dirs
(if exists) - copies
deployer/cron.d
to the right place (if exists) - creates a supervisor file to run the server (if exists)
- creates an Nginx file to be able to proxy through: (a) for CertBot (b) with a Cloudflare Origin Certificate
- runs CertBot if asked for
Note: deployer.pl will add the following ENV VARS where needed without them
having to be in deployer/env
:
- APEX (from
deployer/settings
) - PORT (from
deployer/settings
) - NODE_ENV=production (if
is_node
) - then all env vars in
deployer/env
deployer/settings:
apex: screenshot.gd
port: 43790
www: 1
Any line with a ?
value in deployer/env
will be prompted for:
DATA_DIR: ?
GOOGLE_ANALYTICS: ?
(Ends)