Skip to content

Commit

Permalink
ready to deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
howowi committed Apr 22, 2024
1 parent b51dd79 commit a3491cc
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 37 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:
OCI_CLI_FINGERPRINT: ${{ secrets.OCI_CLI_FINGERPRINT }}
OCI_CLI_KEY_CONTENT: ${{ secrets.OCI_CLI_KEY_CONTENT }}
OCI_CLI_REGION: ${{ secrets.OCI_CLI_REGION }}
REACT_APP_CARLIST_URL: http://158.178.137.168/car-service-redis/cars
REACT_APP_CARAPP_LOGINAUTH_URL: http://158.178.137.168/user-service-redis/authn
REACT_APP_GET_USER_BY_ID: http://158.178.137.168/user-service-redis/users/
REACT_APP_CREATE_ORDER_API: http://158.178.137.168/order-service/create-order
REACT_APP_CARLIST_URL: http://140.238.204.249/car-service-redis/cars
REACT_APP_CARAPP_LOGINAUTH_URL: http://140.238.204.249/user-service-redis/authn
REACT_APP_GET_USER_BY_ID: http://140.238.204.249/user-service-redis/users/
REACT_APP_CREATE_ORDER_API: http://140.238.204.249/order-service/create-order
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ kubectl get secrets -n supremo

#### Update Code and Run Github Action

1. Search for `158.178.137.168` across all the files in this repository and update it with the IP address of the backend server.
1. Search for `140.238.204.249` across all the files in this repository and update it with the IP address of the backend server.

2. Commit and push the changes to Github.

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function App(backendData, setShowPopular, setShowFilter, setFilterOptions) {

useEffect(() => {
// Fetch booking data
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:>> ", data);
Expand All @@ -115,7 +115,7 @@ function App(backendData, setShowPopular, setShowFilter, setFilterOptions) {
// Fetch car data
const fetchUserData = async () => {
try {
const response = await fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`);
const response = await fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`);
const userData = await response.json();
setUserData(userData);

Expand Down
4 changes: 2 additions & 2 deletions frontend/src/TopNavBarN.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const TopNavBarN = ({ onLogout, userJsonVal, bookingCount, clearFilters }) => {
setUserID(userId);
console.log('Fetching data for user ID:', userJsonVal.userid);

fetch(`http://158.178.137.168/order-service/user-orders?userid=${userId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${userId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:", data.length);
Expand All @@ -47,7 +47,7 @@ const TopNavBarN = ({ onLogout, userJsonVal, bookingCount, clearFilters }) => {
setUserID(userId);
console.log('Fetching data for user ID: > ', userId);

fetch(`http://158.178.137.168/order-service/user-orders?userid=${userId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${userId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:>> ", data);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/AboutUs.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function AboutUs({ onLogout, userJsonVal, bookingCount }) {
useEffect(() => {
if(getUserId){
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/AskMe.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function AskMe({ onLogout, userJsonVal, bookingCount }) {
useEffect(() => {
if (getUserId) {
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand Down Expand Up @@ -78,7 +78,7 @@ function AskMe({ onLogout, userJsonVal, bookingCount }) {
redirect: 'follow'
};

fetch("http://158.178.137.168/askme-search", requestOptions)
fetch("http://140.238.204.249/askme-search", requestOptions)
.then(response => response.json())
.then(result => {
console.log(result);
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/CarCheckOut copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function CarCheckOut({ bookingDetails }) {


useEffect(() => {
fetch("http://158.178.137.168/car-service-redis/cars"+`/${id}`)
fetch("http://140.238.204.249/car-service-redis/cars"+`/${id}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand All @@ -61,7 +61,7 @@ function CarCheckOut({ bookingDetails }) {

useEffect(() => {
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand All @@ -86,7 +86,7 @@ function CarCheckOut({ bookingDetails }) {
//console.log("userDataN ", userDataN);

useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand Down Expand Up @@ -148,7 +148,7 @@ function CarCheckOut({ bookingDetails }) {
const handleCheckout = async () => {
// Call your authentication API with username and password
//console.log("api calling ", process.env.REACT_APP_CREATE_ORDER_API);
const response = await fetch("http://158.178.137.168/order-service/create-order", {
const response = await fetch("http://140.238.204.249/order-service/create-order", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/pages/CarCheckOut.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ function CarCheckOut({ bookingDetails }) {


useEffect(() => {
fetch("http://158.178.137.168/car-service-redis/cars" + `/${id}`)
fetch("http://140.238.204.249/car-service-redis/cars" + `/${id}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand All @@ -68,7 +68,7 @@ function CarCheckOut({ bookingDetails }) {

useEffect(() => {
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand All @@ -93,7 +93,7 @@ function CarCheckOut({ bookingDetails }) {
//console.log("userDataN ", userDataN);

useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand Down Expand Up @@ -155,7 +155,7 @@ function CarCheckOut({ bookingDetails }) {
const handleCheckout = async () => {
// Call your authentication API with username and password
//console.log("api calling ", process.env.REACT_APP_CREATE_ORDER_API);
const response = await fetch("http://158.178.137.168/order-service/create-order", {
const response = await fetch("http://140.238.204.249/order-service/create-order", {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/CarDetails copy 2.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function CarDetails({ setBookingDetails }) {

useEffect(() => {
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand All @@ -55,7 +55,7 @@ function CarDetails({ setBookingDetails }) {
}, [getUserId]);

useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/CarDetails copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function CarDetails({ setBookingDetails }) {

useEffect(() => {
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand All @@ -55,7 +55,7 @@ function CarDetails({ setBookingDetails }) {
}, [getUserId]);

useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/CarDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function CarDetails({ setBookingDetails }) {
}, [id]);

useEffect(() => {
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
setcarsCountData(data);
Expand All @@ -46,7 +46,7 @@ function CarDetails({ setBookingDetails }) {
}, [getUserId]);

useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
setUserData(data);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/ConfirmBooking.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function ConfirmBooking() {
}, [id]);

useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand All @@ -57,7 +57,7 @@ function ConfirmBooking() {

useEffect(() => {
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/MyBookings copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ function MyBookings({ onLogout, userJsonVal, bookingCount }) {
}
};
useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand All @@ -47,7 +47,7 @@ function MyBookings({ onLogout, userJsonVal, bookingCount }) {

useEffect(() => {
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand Down Expand Up @@ -87,7 +87,7 @@ function MyBookings({ onLogout, userJsonVal, bookingCount }) {
setSelectedCarId(carId);
setShowModal(true);

fetch(`http://158.178.137.168/car-service-redis/carshealth/${carId}`)
fetch(`http://140.238.204.249/car-service-redis/carshealth/${carId}`)
.then((response) => response.json())
.then((data) => {
console.log("Car Details:", data);
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/pages/MyBookings.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function MyBookings({ onLogout, userJsonVal, bookingCount }) {
}
};
useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
// console.log("from http://146.56.171.43:8081 ", id);
Expand All @@ -68,7 +68,7 @@ function MyBookings({ onLogout, userJsonVal, bookingCount }) {
});

console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand Down Expand Up @@ -121,7 +121,7 @@ function MyBookings({ onLogout, userJsonVal, bookingCount }) {
console.log("car health check for car id", carId);
setSelectedCarId(carId);

fetch(`http://158.178.137.168/car-service-redis/carshealth/${carId}`)
fetch(`http://140.238.204.249/car-service-redis/carshealth/${carId}`)
.then((response) => response.json())
.then((data) => {
console.log("Car Details:", data);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const Login = () => {
// myHeaders.append("Content-Type", "application/json",);
// let raw = JSON.stringify({ userid: username, password });

// const response = await fetch("http://158.178.137.168/user-service-redis/authn", {
// const response = await fetch("http://140.238.204.249/user-service-redis/authn", {
// method: 'POST',
// mode: 'cors', // this cannot be 'no-cors'
// headers: {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/pages/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function Profile({ onLogout, userJsonVal, bookingCount }) {


useEffect(() => {
fetch(`http://158.178.137.168/user-service-redis/users/${getUserId}`)
fetch(`http://140.238.204.249/user-service-redis/users/${getUserId}`)
.then((response) => response.json())
.then((data) => {
setUserData(data);
Expand All @@ -38,7 +38,7 @@ function Profile({ onLogout, userJsonVal, bookingCount }) {
useEffect(() => {
if(getUserId){
console.log('Fetching data for user ID:', getUserId);
fetch(`http://158.178.137.168/order-service/user-orders?userid=${getUserId}`)
fetch(`http://140.238.204.249/order-service/user-orders?userid=${getUserId}`)
.then((response) => response.json())
.then((data) => {
console.log("Data from server:)) ", data);
Expand Down

0 comments on commit a3491cc

Please sign in to comment.