-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev
More file actions
executable file
·29 lines (25 loc) · 780 Bytes
/
Copy pathdev
File metadata and controls
executable file
·29 lines (25 loc) · 780 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
#!/usr/bin/env bash
IMAGE="node:22"
PODMAN_CMD=(podman run -it --rm --userns=keep-id -v "$PWD":/app -w /app)
case "$1" in
up)
echo "Starting Gatsby development server..."
"${PODMAN_CMD[@]}" -p 8000:8000 $IMAGE yarn run start
;;
yarn)
shift # Remove 'yarn' from the arguments
echo "Running yarn $@..."
"${PODMAN_CMD[@]}" $IMAGE yarn "$@"
;;
shell)
echo "Opening container shell..."
"${PODMAN_CMD[@]}" $IMAGE bash
;;
*)
echo "Gatsby Podman Wrapper"
echo "Usage:"
echo " ./dev up - Start the Gatsby development server on port 8000"
echo " ./dev yarn [args] - Run yarn commands (e.g., ./dev.sh yarn install)"
echo " ./dev shell - Open a shell inside the container for debugging"
;;
esac