Skip to content

Commit

Permalink
fixing again
Browse files Browse the repository at this point in the history
  • Loading branch information
pdelebarre committed Oct 29, 2024
1 parent 5175a71 commit fae037e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,10 @@ services:
frontend:
image: pdelebarre/guitar-tutorial-app-frontend
container_name: frontend
# environment:
# TUTO_API_URL: http://nginx
# TUTO_API_PORT: 8080
environment:
TUTO_API_URL: http://nginx/api # Set API URL to go through Nginx
ports:
- "3000:80"
depends_on:
- backend
- nginx
- "3000:80" # Uncomment if you want direct access to frontend on port 3000
networks:
- guitartuto-network

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/api/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { Comment, Playlist } from "../types/types";

// Create axios instance with simplified baseURL
const api = axios.create({
baseURL: import.meta.env.VITE_API_BASE_URL // Proxy will route to backend on port 80
baseURL: import.meta.env.VITE_API_BASE_URL || "/api" // Proxy will route to backend on port 80
});

// Debugging the axios instance baseURL
Expand Down

0 comments on commit fae037e

Please sign in to comment.