Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
build: update install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
spwoodcock committed Apr 28, 2024
1 parent 8a52dbb commit 0c9cb36
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 17 deletions.
17 changes: 3 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,23 +30,12 @@ Credentials:
## Usage (Production)

- Buy a domain and allocated a server.
- Clone the repo on the server:
- Run the interactive install script:

```bash
git clone https://github.com/hotosm/osm-sandbox.git
cd https://github.com/hotosm/osm-sandbox.git
```sh
curl --proto '=https' --tlsv1.2 -sSf https://get.sandbox.hotosm.dev | bash
```

- Create a `.env` file:

```dotenv
DOMAIN=your.domain.org
[email protected]
ADMIN_PASS=supersecurepassword
[email protected]
```


## Importing Existing OSM Data

Check out [osm_to_sandbox](https://github.com/Zverik/osm_to_sandbox/tree/main)
8 changes: 5 additions & 3 deletions docs/get-installer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ cleanup_and_exit() {
download_utils() {
curl --proto '=https' --tlsv1.2 --silent --show-error --fail \
--location https://get.sandbox.hotosm.dev/utils.sh \
--output install-sandbox.sh 2>&1
--output utils.sh 2>&1
chmod +x utils.sh
source utils.sh
. utils.sh
}

check_docker() {
Expand All @@ -42,7 +42,9 @@ check_docker() {
chmod +x install-docker.sh
bash install-docker.sh
else
echo "Docker is Required. Aborting."
echo
red_echo "Docker is required. Aborting."
echo
exit 1
fi
}
Expand Down
8 changes: 8 additions & 0 deletions docs/install-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ set -o pipefail

# Tested for Debian 11 Bookworm & Ubuntu 22.04 LTS

# Import helper utils
if [ -f "utils.sh" ]; then
. ./utils.sh
else
echo "Error: utils.sh not found."
exit 1
fi

# Auto accept all apt prompts
export DEBIAN_FRONTEND=noninteractive

Expand Down
8 changes: 8 additions & 0 deletions docs/install-sandbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ set -o pipefail

# Tested for Debian 11 Bookworm & Ubuntu 22.04 LTS

# Import helper utils
if [ -f "utils.sh" ]; then
. ./utils.sh
else
echo "Error: utils.sh not found."
exit 1
fi

# Auto accept all apt prompts
export DEBIAN_FRONTEND=noninteractive

Expand Down
5 changes: 5 additions & 0 deletions docs/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ yellow_echo() {
echo -e "\e[0;33m${text}\e[0m"
}

red_echo() {
local text="$1"
echo -e "\e[0;33m${text}\e[0m"
}

install_progress() {
local pid=$1
local delay=0.5
Expand Down

0 comments on commit 0c9cb36

Please sign in to comment.