-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.sh
executable file
·38 lines (29 loc) · 943 Bytes
/
app.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
#!/bin/bash
cd "$(dirname "$0")"
if [[ "$1" == "start" ]]; then
docker-compose start
elif [[ "$1" == "stop" ]]; then
docker-compose stop
elif [[ "$1" == "up" ]]; then
docker-compose up -d --wait
docker exec -w /app rss-app-api-1 composer run migrate
docker exec -w /app rss-app-api-1 composer run seed
elif [[ "$1" == "down" ]]; then
docker-compose down
elif [[ "$1" == "api-sh" ]]; then
docker exec -it -w /app rss-app-api-1 sh
elif [[ "$1" == "pwa-sh" ]]; then
docker exec -it -w /app rss-app-pwa-1 sh
elif [[ "$1" == "install" ]]; then
docker run -v ./packages/api:/app -w /app --rm -it rss-app-api composer install
docker run -v .:/app -w /app --rm -it node:20-alpine3.18 yarn
else
echo "Usage: ./app.sh [command]"
echo "Commands:"
echo " - start"
echo " - stop"
echo " - up"
echo " - down"
echo " - api-sh"
echo " - pwa-sh"
fi