Skip to content

Commit

Permalink
v1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
MaikeWilliam committed Aug 22, 2024
1 parent 7b33975 commit 53ce6ce
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
16 changes: 12 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,26 @@ services:
build:
context: ./api_flask
ports:
- "8132:8132" # era "5000:5000"
- "8132:8132" # Mapeia a porta 8132 do container para a porta 8132 do host
volumes:
- ./api_flask:/app
- ./api_flask:/app # Sincroniza o diretório local com o diretório de trabalho no container
environment:
- FLASK_ENV=development
networks:
- my-network

frontend:
build:
context: ./front-end/project-interface
ports:
- "3001:80"
- "3001:80" # Mapeia a porta 80 do container para a porta 3001 do host
depends_on:
- backend
environment:
- VITE_API_URL=http://backend:8132
- VITE_API_URL=http://backend:8132 # Variável de ambiente para URL do backend
networks:
- my-network

networks:
my-network:
driver: bridge
1 change: 1 addition & 0 deletions front-end/project-interface/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_API_URL=http://backend:8132
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import Card from "../Card/Card";
import api from "axios";

// URL do backend com o IP e a porta corretos
const backendUrl = "http://10.0.0.106:8132";
const backendUrl = process.env.VITE_API_URL;

export default function Tensores() {
const [metricas, setMetricas] = useState([]);
Expand Down

0 comments on commit 53ce6ce

Please sign in to comment.