drzg15 commited on
Commit
572b786
·
1 Parent(s): b506cd1

working docker

Browse files
README.md CHANGED
@@ -5,7 +5,6 @@ colorTo: red
5
  sdk: docker
6
  app_port: 7860
7
  pinned: false
8
- short_description: Streamlit template space
9
  ---
10
 
11
  # Heattransplanapp
 
5
  sdk: docker
6
  app_port: 7860
7
  pinned: false
 
8
  ---
9
 
10
  # Heattransplanapp
docker-compose.yml CHANGED
@@ -13,7 +13,7 @@ services:
13
  dockerfile: Dockerfile
14
  container_name: heattransplan-frontend
15
  environment:
16
- - VITE_API_BASE=http://localhost:8000
17
  depends_on:
18
  - backend
19
  ports:
 
13
  dockerfile: Dockerfile
14
  container_name: heattransplan-frontend
15
  environment:
16
+ - VITE_API_BASE=
17
  depends_on:
18
  - backend
19
  ports:
frontend/src/api/client.ts CHANGED
@@ -1,6 +1,6 @@
1
  import axios from 'axios';
2
 
3
- const API_BASE = import.meta.env.VITE_API_BASE || 'http://localhost:8000';
4
 
5
  const client = axios.create({
6
  baseURL: API_BASE,
 
1
  import axios from 'axios';
2
 
3
+ const API_BASE = import.meta.env.VITE_API_BASE || '';
4
 
5
  const client = axios.create({
6
  baseURL: API_BASE,
frontend/src/api/io.ts CHANGED
@@ -16,17 +16,17 @@ export async function importJsonBody(state: ProjectState): Promise<{ project_id:
16
  }
17
 
18
  export function exportJsonUrl(projectId: string): string {
19
- const base = import.meta.env.VITE_API_BASE || 'http://localhost:8000';
20
  return `${base}/api/io/export-json/${projectId}`;
21
  }
22
 
23
  export function exportCsvUrl(projectId: string): string {
24
- const base = import.meta.env.VITE_API_BASE || 'http://localhost:8000';
25
  return `${base}/api/io/export-csv/${projectId}`;
26
  }
27
 
28
  export function exportReportUrl(projectId: string): string {
29
- const base = import.meta.env.VITE_API_BASE || 'http://localhost:8000';
30
  return `${base}/api/io/export-report/${projectId}`;
31
  }
32
 
 
16
  }
17
 
18
  export function exportJsonUrl(projectId: string): string {
19
+ const base = import.meta.env.VITE_API_BASE || '';
20
  return `${base}/api/io/export-json/${projectId}`;
21
  }
22
 
23
  export function exportCsvUrl(projectId: string): string {
24
+ const base = import.meta.env.VITE_API_BASE || '';
25
  return `${base}/api/io/export-csv/${projectId}`;
26
  }
27
 
28
  export function exportReportUrl(projectId: string): string {
29
+ const base = import.meta.env.VITE_API_BASE || '';
30
  return `${base}/api/io/export-report/${projectId}`;
31
  }
32
 
frontend/vite.config.ts CHANGED
@@ -8,7 +8,7 @@ export default defineConfig({
8
  port: 5173,
9
  proxy: {
10
  '/api': {
11
- target: 'http://localhost:8000',
12
  changeOrigin: true,
13
  },
14
  },
 
8
  port: 5173,
9
  proxy: {
10
  '/api': {
11
+ target: 'http://backend:8000',
12
  changeOrigin: true,
13
  },
14
  },