-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·37 lines (26 loc) · 791 Bytes
/
run.sh
File metadata and controls
executable file
·37 lines (26 loc) · 791 Bytes
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
#!/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=3000
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 3000)
else
# Default to local environment
echo "Running locally."
URL="http://localhost:3000/"
fi
echo "Oteltester running on port 3000 at: $URL"