8d40422e0f
- Add a shell script to orchestrate a production setup with `docker-compose`. The script fetches config and `docker-compose.yml` from the `master` branch, generates a secure password, performs DB migrations and starts the container services. - Add a health check for Postgres container service in `docker-compose.yml`. - Add cusotm `container_name` for services inside `docker-compose`. This is helpful to check the status of containers in the install shell script.
36 lines
800 B
Bash
Executable file
36 lines
800 B
Bash
Executable file
#!/usr/bin/env sh
|
|
set -eu
|
|
|
|
# Listmonk demo setup using `docker-compose`.
|
|
# See https://listmonk.app/docs/installation/ for detailed installation steps.
|
|
|
|
check_dependencies() {
|
|
if ! command -v curl > /dev/null; then
|
|
echo "curl is not installed."
|
|
exit 1
|
|
fi
|
|
|
|
if ! command -v docker > /dev/null; then
|
|
echo "docker is not installed."
|
|
exit 1
|
|
fi
|
|
|
|
if ! command -v docker-compose > /dev/null; then
|
|
echo "docker-compose is not installed."
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
setup_containers() {
|
|
curl -o docker-compose.yml https://raw.githubusercontent.com/knadh/listmonk/master/docker-compose.yml
|
|
docker-compose up -d demo-db demo-app
|
|
}
|
|
|
|
show_output(){
|
|
echo -e "\nListmonk is now up and running. Visit http://localhost:9000 in your browser.\n"
|
|
}
|
|
|
|
|
|
check_dependencies
|
|
setup_containers
|
|
show_output
|