Skip to content

Commit

Permalink
backend url change to nginx reverse proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
mustafakucuk-dev committed Dec 26, 2023
1 parent 6ad72b2 commit 8be5366
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/frontend_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,5 @@ jobs:
"docker pull ${{ secrets.DOCKERHUB_USERNAME }}/gamelounge-frontend:${{ github.run_number }} && \
docker stop gamelounge-frontend || true && \
docker rm gamelounge-frontend || true && \
docker run -d --name gamelounge-frontend -p 3000:3000 -e REACT_APP_API_URL=http://${{ secrets.SERVER_IP }}:8080 ${{ secrets.DOCKERHUB_USERNAME }}/gamelounge-frontend:${{ github.run_number }}"
docker run -d --name gamelounge-frontend -p 3000:3000 -e REACT_APP_API_URL=https://game-lounge.com:9090 ${{ secrets.DOCKERHUB_USERNAME }}/gamelounge-frontend:${{ github.run_number }}"
6 changes: 3 additions & 3 deletions app/frontend/src/components/PostCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const PostCard = ({ post, currentUser, onUpvote, onDownvote }) => {
useEffect(() => {
const loadAnnotations = async () => {
try {
const response = await getAnnotationsByTarget(`http://167.99.242.175:8080/post/${post.postId}`)
const response = await getAnnotationsByTarget(`https://game-lounge.com:9090/post/${post.postId}`)

const transformedAnnotations = response.data.map((annotation) => ({
startIndex: annotation.target.selector.start,
Expand Down Expand Up @@ -83,7 +83,7 @@ const PostCard = ({ post, currentUser, onUpvote, onDownvote }) => {
id: annotationUuid, // Use generated UUID
type: 'Annotation',
motivation: ['commenting', 'annotating'],
creator: `http://167.99.242.175:8080/user/${username}`, // Use fetched username
creator: `https://game-lounge.com:9090/user/${username}`, // Use fetched username
created: new Date().toISOString(),
body: [
{
Expand All @@ -96,7 +96,7 @@ const PostCard = ({ post, currentUser, onUpvote, onDownvote }) => {
}
],
target: {
id: `http://167.99.242.175:8080/post/${post.postId}`,
id: `https://game-lounge.com:9090/post/${post.postId}`,
format: 'text/html',
language: 'en',
selector: {
Expand Down
2 changes: 1 addition & 1 deletion app/frontend/src/services/AnnotationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import axios from 'axios'

const axiosInstance = axios.create({
// baseURL: process.env.REACT_APP_API_URL
baseURL: 'http://167.99.242.175:8081'
baseURL: 'https://game-lounge.com:9091'
})

axiosInstance.defaults.withCredentials = true
Expand Down

0 comments on commit 8be5366

Please sign in to comment.