generated from arafkarsh/ms-springboot-324-java-22-jakarta-ee-10
-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathstartfg
executable file
·41 lines (33 loc) · 1.41 KB
/
startfg
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
#!/bin/bash
#---------------------------------------------------------------
# Container Manager
# Araf Karsh Hamid, (c) Copyright 2025
# License: Apache 2.0
# Version 0.01
#---------------------------------------------------------------
# Start Container in Foreground
# --------------------------------------------------------------
# Get the Org Name, Service Name, Version and Full Container Name
source serviceName
cd src/docker
source utils/common-functions
PORT=9334
APP_PROFILE=$2
# Determine configuration based on $1
determine_os_java "$1" "$FULL_NAME"
# Check if Colima is running, if Not Start Colima
source utils/colimaStatus
#echo "Checkout API: http://localhost:$PORT/$API/api/v1/swagger-ui.html"
echo "docker container run -it --network="host" --name $SERVICE-$VERSION --rm -p $PORT:9334 \ "
echo "-e JASYPT_ENCRYPTOR_PASSWORD=${JASYPT_ENCRYPTOR_PASSWORD} \ "
echo "-e APP_PROFILE=$APP_PROFILE \ "
echo "-e SPRING_PROFILES_ACTIVE=$APP_PROFILE \ "
echo "-e SPRING_DATASOURCE_URL=jdbc:postgresql://host.docker.internal:5433/ms_vanilla_334 \ "
echo "$FULL_NAME "
# Start the Container in Foreground
docker container run -it --network="host" --name $SERVICE-$VERSION --rm -p $PORT:9334 \
-e JASYPT_ENCRYPTOR_PASSWORD=${JASYPT_ENCRYPTOR_PASSWORD} \
-e APP_PROFILE=$APP_PROFILE \
-e SPRING_PROFILES_ACTIVE=$APP_PROFILE \
-e SPRING_DATASOURCE_URL=jdbc:postgresql://host.docker.internal:5433/ms_vanilla_334 \
$FULL_NAME