Skip to content

Commit 9bdee0f

Browse files
committed
refactor: remove deprecated scripts and update service configurations to use port 8761
1 parent b30457f commit 9bdee0f

File tree

23 files changed

+27
-586
lines changed

23 files changed

+27
-586
lines changed

.github/workflows/deploy.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ env:
1313
REGISTRY: ${{ secrets.OCI_REGISTRY }}
1414
OCI_USERNAME: ${{ secrets.OCI_USERNAME }}
1515
OCI_AUTH_TOKEN: ${{ secrets.OCI_AUTH_TOKEN }}
16-
VM_IP: ${{ secrets.VM_IP }}
1716

1817
jobs:
1918
build:
@@ -80,13 +79,13 @@ jobs:
8079
if [ -z "$JAR_PATH" ]; then
8180
echo "Error: JAR not found for $service"
8281
exit 1
83-
fi
82+
}
8483
echo "$service build successful: $JAR_PATH"
8584
done
8685
8786
# Special handling for user-tracking-service which might have a different version
8887
UT_JAR_PATH=$(find user-tracking-service -name "*.jar" | grep -v "\.original" | head -n 1)
89-
if [ -z "$UT_JAR_PATH" ]; then
88+
if [ -z "$UT_JAR_PATH"]; then
9089
echo "Creating empty JAR for user-tracking-service to continue workflow"
9190
# Create minimal valid JAR file
9291
mkdir -p user-tracking-service/target/classes
@@ -145,7 +144,7 @@ jobs:
145144

146145
- name: Build frontend
147146
env:
148-
REACT_APP_API_BASE_URL: http://${{ secrets.VM_IP }}:8080
147+
REACT_APP_API_BASE_URL: https://${{ secrets.ORACLE_VM_IP }}
149148
run: |
150149
cd frontend
151150
npm ci
@@ -177,7 +176,7 @@ jobs:
177176

178177
- name: Verify VM Connection
179178
env:
180-
ORACLE_VM_IP: ${{ secrets.VM_IP }}
179+
ORACLE_VM_IP: ${{ secrets.ORACLE_VM_IP }}
181180
run: |
182181
echo "Verifying VM connection..."
183182
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ssh_key.pem
@@ -186,7 +185,7 @@ jobs:
186185
187186
- name: Deploy to Oracle VM
188187
env:
189-
ORACLE_VM_IP: ${{ secrets.VM_IP }}
188+
ORACLE_VM_IP: ${{ secrets.ORACLE_VM_IP }}
190189
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
191190
DOCKER_REGISTRY: ${{ secrets.OCI_REGISTRY }}
192191
DOCKER_USERNAME: ${{ secrets.OCI_USERNAME }}
@@ -200,7 +199,7 @@ jobs:
200199
echo "${{ secrets.OCI_AUTH_TOKEN }}" | docker login ${{ secrets.OCI_REGISTRY }} -u ${{ secrets.OCI_USERNAME }} --password-stdin || exit 1
201200
202201
# Set environment variables for docker-compose
203-
export VM_IP=${{ secrets.VM_IP }}
202+
export ORACLE_EXTERNAL_HOSTNAME=${{ secrets.ORACLE_VM_IP }}
204203
export DOCKER_REGISTRY=${{ secrets.OCI_REGISTRY }}
205204
206205
docker-compose pull || exit 1

Dockerfile

-218 Bytes
Binary file not shown.

api-gateway/src/main/java/com/example/apigateway/service/SelfPingService.java

Lines changed: 0 additions & 56 deletions
This file was deleted.

api-gateway/src/main/resources/application.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,6 @@ spring:
103103
filters:
104104
- RewritePath=/user-tracking(?<segment>/?.*), /user-tracking$\{segment}
105105

106-
# Self-ping configuration to keep the service alive
107-
app:
108-
self-ping:
109-
enabled: true
110-
service-url: http://${ORACLE_EXTERNAL_HOSTNAME}:8080/actuator/health
111-
112106
eureka:
113107
client:
114108
service-url:
@@ -119,3 +113,4 @@ eureka:
119113
hostname: ${ORACLE_EXTERNAL_HOSTNAME}
120114
non-secure-port-enabled: true
121115
secure-port-enabled: false
116+

build_and_run.bat

Lines changed: 0 additions & 43 deletions
This file was deleted.

cleanup.bat

Lines changed: 0 additions & 17 deletions
This file was deleted.

deploy_oracle_cloud.sh

Lines changed: 0 additions & 56 deletions
This file was deleted.

deprecated_scripts/set_oracle_env.template.bat

Lines changed: 0 additions & 31 deletions
This file was deleted.

docker-compose.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ services:
66
context: ./eureka-server
77
dockerfile: ./Dockerfile
88
ports:
9-
- "8762:8762"
9+
- "8761:8761"
1010
environment:
1111
- SPRING_PROFILES_ACTIVE=docker
12-
- SERVER_PORT=8762
12+
- SERVER_PORT=8761
1313
healthcheck:
14-
test: "wget -q --spider http://localhost:8762/actuator/health || exit 1"
14+
test: "wget -q --spider http://localhost:8761/actuator/health || exit 1"
1515
interval: 10s
1616
timeout: 5s
1717
retries: 10
@@ -26,7 +26,7 @@ services:
2626
- "8080:8080"
2727
environment:
2828
- SPRING_PROFILES_ACTIVE=docker
29-
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8762/eureka/
29+
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8761/eureka/
3030
depends_on:
3131
eureka-server:
3232
condition: service_healthy
@@ -40,7 +40,7 @@ services:
4040
- "8082:8082"
4141
environment:
4242
- SPRING_PROFILES_ACTIVE=docker
43-
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8762/eureka/
43+
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8761/eureka/
4444
depends_on:
4545
eureka-server:
4646
condition: service_healthy
@@ -55,7 +55,7 @@ services:
5555
- "8083:8083"
5656
environment:
5757
- SPRING_PROFILES_ACTIVE=docker
58-
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8762/eureka/
58+
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8761/eureka/
5959
depends_on:
6060
eureka-server:
6161
condition: service_healthy
@@ -70,7 +70,7 @@ services:
7070
- "8084:8084"
7171
environment:
7272
- SPRING_PROFILES_ACTIVE=docker
73-
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8762/eureka/
73+
- EUREKA_CLIENT_SERVICEURL_DEFAULTZONE=http://eureka-server:8761/eureka/
7474
depends_on:
7575
eureka-server:
7676
condition: service_healthy

eureka-server/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ USER spring:spring
2828

2929
# Configure health check - updated to include double quotes around command
3030
HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \
31-
CMD wget -q --spider "http://localhost:8762/actuator/health" || exit 1
31+
CMD wget -q --spider "http://localhost:8761/actuator/health" || exit 1
3232

33-
EXPOSE 8762
33+
EXPOSE 8761
3434
ENTRYPOINT ["java", "-XX:+UseContainerSupport", "-XX:MaxRAMPercentage=75.0", "-jar", "/app.jar"]

0 commit comments

Comments
 (0)