2021-06-14 13:50:13 +00:00
|
|
|
#!/usr/bin/env sh
|
|
|
|
set -eu
|
2021-01-21 16:06:32 +00:00
|
|
|
|
|
|
|
# Listmonk demo setup using `docker-compose`.
|
|
|
|
# See https://listmonk.app/docs/installation/ for detailed installation steps.
|
|
|
|
|
2021-06-14 13:50:13 +00:00
|
|
|
check_dependencies() {
|
2021-01-21 16:06:32 +00:00
|
|
|
if ! command -v curl > /dev/null; then
|
|
|
|
echo "curl is not installed."
|
|
|
|
exit 1
|
2021-08-28 13:43:51 +00:00
|
|
|
fi
|
2021-01-21 16:06:32 +00:00
|
|
|
|
|
|
|
if ! command -v docker > /dev/null; then
|
|
|
|
echo "docker is not installed."
|
|
|
|
exit 1
|
2021-08-28 13:43:51 +00:00
|
|
|
fi
|
2021-01-21 16:06:32 +00:00
|
|
|
|
|
|
|
if ! command -v docker-compose > /dev/null; then
|
|
|
|
echo "docker-compose is not installed."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
setup_containers() {
|
2021-08-28 13:43:51 +00:00
|
|
|
curl -o docker-compose.yml https://raw.githubusercontent.com/knadh/listmonk/master/docker-compose.yml
|
|
|
|
docker-compose up -d demo-db demo-app
|
2021-01-21 16:06:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
show_output(){
|
2021-08-28 13:43:51 +00:00
|
|
|
echo -e "\nListmonk is now up and running. Visit http://localhost:9000 in your browser.\n"
|
2021-01-21 16:06:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2021-06-14 13:50:13 +00:00
|
|
|
check_dependencies
|
2021-01-21 16:06:32 +00:00
|
|
|
setup_containers
|
|
|
|
show_output
|