generated from honeycombio/.github
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrun
executable file
·42 lines (30 loc) · 906 Bytes
/
run
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
#!/bin/sh
# Run to start the whole system up, 5 services (one is nginx)
# `./run``
# Or, run with a parameter service name (from docker-compose) to restart just that service
# `./run meminator`
if ! docker compose up --build -d "$@"; then
echo ""
echo "Failed to build or start services!"
exit 1
fi
# Check if running in GitHub Codespaces
if [ -n "$CODESPACES" ]; then
echo "Running in GitHub Codespaces."
APP_PORT=10114
URL="https://${CODESPACE_NAME}-${APP_PORT}.app.github.dev"
# Check if running in Gitpod
elif [ -n "$GITPOD_INSTANCE_ID" ]; then
echo "Running in Gitpod."
# Get the workspace url
URL=$(gp url 10114)
else
# Default to local environment
echo "Running locally."
URL="http://localhost:10114/"
fi
# print out where to go in Honeycomb
./scripts/honeycomb-whoami.sh
echo "############"
echo "### Meminator running on port 10114 at: $URL"
echo "############"