-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscripts.sh
More file actions
executable file
·76 lines (54 loc) · 1.47 KB
/
scripts.sh
File metadata and controls
executable file
·76 lines (54 loc) · 1.47 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
user_service() {
set -a
cp .env.local.example .env
source .env
if [ $1 ]; then
USER_SERVICE_PORT=$1
fi
echo "Running User-Service on port ${USER_SERVICE_PORT}..."
# Navigate to the correct directory and run the service
cd ./user-management/cmd/user-service || exit
go run main.go
}
task_service() {
set -a
cp .env.local.example .env
source .env
if [ $1 ]; then
TASK_SERVICE_PORT=$1
fi
echo "Running Task-Service on port $(TASK_SERVICE_PORT)..."
# Navigate to the correct directory and run the service
cd ./task-management/cmd/task-service || exit
go run main.go
}
notification_service() {
set -a
cp .env.local.example .env
source .env
if [ $1 ]; then
NOTIFICATION_SERVICE_PORT=$1
fi
echo "Running Notification-Service on port $(NOTIFICATION_SERVICE_PORT)..."
# Navigate to the correct directory and run the service
cd ./user-notification/cmd/notification-service || exit
go run main.go
}
migrate_up() {
set -a
cp .env.local.example .env
source .env
echo "Running migrations up..."
# Navigate to the correct directory and run the service
cd ./pkg/migrations|| exit
go run cmd/main.go migrate-up
}
migrate_down() {
set -a
cp .env.local.example .env
source .env
echo "Reverting migrations..."
# Navigate to the correct directory and run the service
cd ./pkg/migrations|| exit
go run cmd/main.go migrate-down
}