-
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:lando/cli into main
- Loading branch information
Showing
6 changed files
with
125 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: lando-renderer | ||
services: | ||
appserver: | ||
api: 3 | ||
type: lando | ||
healthcheck: healthcheck | ||
services: | ||
image: php:8.2-fpm | ||
command: docker-php-entrypoint sleep infinity | ||
volumes: | ||
- "./healthcheck.sh:/usr/local/bin/healthcheck" | ||
nginx: | ||
api: 3 | ||
type: lando | ||
healthcheck: healthcheck | ||
services: | ||
image: nginx:1.22.1 | ||
command: /docker-entrypoint.sh nginx -g "daemon off;" | ||
ports: | ||
- 80 | ||
volumes: | ||
- ./:/usr/share/nginx/html | ||
- "./healthcheck.sh:/usr/local/bin/healthcheck" | ||
run_as_root: | ||
- echo "$(id)" > /run_as_root.txt | ||
- ln -snf /usr/share/zoneinfo/America/New_York /etc/localtime | ||
- echo "America/New_York" > /etc/timezone | ||
overrides: | ||
environment: | ||
THING: STUFF | ||
volumes: | ||
- "./test.txt:/var/www/test.txt" | ||
database: | ||
api: 3 | ||
type: lando | ||
healthcheck: healthcheck | ||
services: | ||
image: mariadb:10.4 | ||
command: docker-entrypoint.sh mysqld | ||
environment: | ||
MARIADB_ALLOW_EMPTY_ROOT_PASSWORD: da | ||
MARIADB_MYSQL_LOCALHOST_USER: da | ||
MARIADB_DATABASE: test | ||
MARIADB_USER: test | ||
MARIADB_PASSWORD: test | ||
MARIADB_AUTO_UPGRADE: da | ||
volumes: | ||
- "./healthcheck.sh:/usr/local/bin/healthcheck" |
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,36 @@ | ||
Renderer Example | ||
================ | ||
|
||
This example exists primarily to test the fallback non-TTY list renderer. | ||
|
||
Start up tests | ||
-------------- | ||
|
||
Run the following commands to get up and running with this example. | ||
|
||
```bash | ||
# Should start up successfully | ||
lando poweroff | ||
lando start | ||
``` | ||
|
||
Verification commands | ||
--------------------- | ||
|
||
Run the following commands to validate things are rolling as they should. | ||
|
||
```bash | ||
# Should use the verbose renderer in a non-TTY environment | ||
lando start | grep "\[COMPLETED\]" | wc -l | grep 5 | ||
``` | ||
|
||
Destroy tests | ||
------------- | ||
|
||
Run the following commands to trash this app like nothing ever happened. | ||
|
||
```bash | ||
# Should be destroyed with success | ||
lando destroy -y | ||
lando poweroff | ||
``` |
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,21 @@ | ||
#!/bin/bash | ||
set -eo pipefail | ||
|
||
rm -rf /healthy | ||
|
||
main () { | ||
local healthfile=/tmp/healthfile | ||
|
||
# if healthcheck file does not exist then create it | ||
if [ ! -f $healthfile ]; then | ||
touch $healthfile | ||
fi | ||
# append an X to the healthfile | ||
echo -n "X" >> $healthfile | ||
# run our "healthcheck" | ||
cat $healthfile | grep -w "XXXXX" && rm -rf $healthfile | ||
} | ||
|
||
main | ||
|
||
touch /healthy |
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,2 @@ | ||
<h1>HAND ME DOWN!</h1> | ||
<h2>or don't</h2> |
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