-
-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-start.sh
More file actions
executable file
·22 lines (16 loc) · 758 Bytes
/
docker-start.sh
File metadata and controls
executable file
·22 lines (16 loc) · 758 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env bash
set -euo pipefail
source "$(realpath "$(realpath "$(dirname "${BASH_SOURCE[0]}")")/../utils.sh")"
ensure_test_container
export DOCKER_TEST_NETWORK_NAME="pyinfra-examples-python-web-app"
echo "Create Docker network..."
docker network create "$DOCKER_TEST_NETWORK_NAME"
echo "Starting Docker containers..."
run_test_container pyinfra-example-python-web-app-webserver -p 9022:22 -p 5000:5000
run_test_container pyinfra-example-python-web-app-dbserver -p 9023:22
echo
echo "Doker containers are now ready to run the pyinfra deploy, you can do this by running:"
echo
echo " pyinfra inventories/docker.py deploy.py"
echo
echo "Once complete, don't forget to remove the Docker containers and network using the ./docker-stop.sh script!"