-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* #39: attempt to install render template in all nginx services * #39: added generic render template support, removed 1.14, set 1.25 as default * #39: added generic render template support, removed 1.14, set 1.25 as default part 2 * #39: added generic render template support, removed 1.14, set 1.25 as default part 3
- Loading branch information
Showing
19 changed files
with
116 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,25 @@ | ||
name: lando-nginx-custom | ||
services: | ||
custom: | ||
type: nginx:1.17 | ||
type: nginx:1.25 | ||
ssl: true | ||
webroot: www | ||
build_as_root: | ||
- apt-get update && apt-get install -y curl | ||
config: | ||
server: config/server2.conf | ||
vhosts: config/custom.conf | ||
params: config/params | ||
custom_legacy: | ||
type: nginx:1.14 | ||
custom_116: | ||
type: nginx:1.16 | ||
ssl: true | ||
webroot: www | ||
config: | ||
server: config/server.conf | ||
server: config/server2.conf | ||
vhosts: config/custom.conf | ||
params: config/params | ||
|
||
# This is important because it lets lando know to test against the plugin in this repo | ||
# DO NOT REMOVE THIS! | ||
plugins: | ||
"@lando/nginx": ./../../ | ||
"@lando/nginx": ../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
#!/bin/sh | ||
|
||
# allow this to run through without failing | ||
# set -e | ||
|
||
# args | ||
version="${1:-"1.0.6"}" | ||
# @TODO: swtich back to amd64? | ||
arch="${2:-"arm64"}" | ||
|
||
# if we have render-template then just exit | ||
if [ "$(command -v render-template)" ]; then exit 0; fi | ||
|
||
# computed | ||
url="https://github.com/bitnami/render-template/releases/download/v${version}/render-template-linux-${arch}.tar.gz" | ||
tmpdir="/tmp/render-template-${version}" | ||
|
||
# prep | ||
rm -rf "$tmpdir" && mkdir -p "$tmpdir" | ||
mkdir -p /usr/local/bin | ||
|
||
# there are different considerations around 1.0.0 | ||
if [ "$version" == "1.0.0" ] && [ "$arch" == "arm64" ]; then | ||
curl -fsSL \ | ||
-o "${tmpdir}/render-template-linux-${arch}" \ | ||
"https://github.com/bitnami/render-template/releases/download/v1.0/render-template-arm64" | ||
|
||
# amd situation | ||
elif [ "$version" == "1.0.0" ] && [ "$arch" == "amd64" ]; then | ||
curl -fsSL \ | ||
-o "${tmpdir}/render-template-linux-${arch}.zip" \ | ||
"https://github.com/bitnami/render-template/releases/download/v1.0/render-template.zip" | ||
unzip "${tmpdir}/render-template-linux-${arch}.zip" -d "${tmpdir}" | ||
mv "${tmpdir}/render-template" "${tmpdir}/render-template-linux-${arch}" | ||
|
||
# everything else can go here though | ||
else | ||
curl -fsSL "$url" | tar -xz -C "$tmpdir" | ||
fi | ||
|
||
# mv & execute | ||
mv "${tmpdir}/render-template-linux-${arch}" /usr/local/bin/render-template | ||
chmod +x /usr/local/bin/render-template | ||
|
||
# allows return fine | ||
# this isnt great but is probably good enough to last us until the lando 4 config generator | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
'use strict'; | ||
|
||
// Modules | ||
const _ = require('lodash'); | ||
|
||
/* | ||
* Helper to get global deps | ||
* @TODO: this looks pretty testable? should services have libs? | ||
*/ | ||
module.exports = (steps, app, name, step = 'build_internal', front = false) => { | ||
const current = _.get(app, `config.services.${name}.${step}`, []); | ||
const add = (front) ? _.flatten([steps, current]) : _.flatten([current, steps]); | ||
_.set(app, `config.services.${name}.${step}`, _.uniq(add)); | ||
}; |