-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-production.sh
67 lines (56 loc) · 1.28 KB
/
install-production.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/usr/bin/env sh
set -eu
# Open Payment Host production setup using `docker-compose`.
# See https://github.com/abishekmuthian/open-payment-host for detailed installation steps.
alias up="cd .."
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_folders(){
mkdir secrets
mkdir db
mkdir log
mkdir certs
mkdir public
cd public
mkdir assets
cd assets
mkdir icons
mkdir images
cd images
mkdir app
mkdir products
cd -
mkdir scripts
mkdir styles
up
up
}
setup_db(){
cd db
curl -o Create-Tables.sql https://raw.githubusercontent.com/abishekmuthian/open-payment-host/main/db/Create-Tables.sql
cd -
}
setup_containers() {
curl -o docker-compose.yml https://raw.githubusercontent.com/abishekmuthian/open-payment-host/main/samples/oph-production/docker-compose.yml
docker compose up -d
}
show_output(){
echo -e "\nOpen Payment Host is now up and running. Stop the container, Set the required production configuration and re-run the container.\n"
}
check_dependencies
setup_folders
setup_db
setup_containers
show_output