Compare commits
8 Commits
main
...
deployment
| Author | SHA1 | Date |
|---|---|---|
|
|
495c3f6808 | |
|
|
5b36ce43a9 | |
|
|
7da4c51a89 | |
|
|
26700d5be1 | |
|
|
ef78b079a7 | |
|
|
cbd5dcae92 | |
|
|
cee8de81e8 | |
|
|
508c2a1ba8 |
|
|
@ -2,22 +2,32 @@ services:
|
||||||
frontend:
|
frontend:
|
||||||
build:
|
build:
|
||||||
context: frontend
|
context: frontend
|
||||||
ports:
|
|
||||||
- 8080:80
|
|
||||||
environment:
|
environment:
|
||||||
- API_HOST=http://localhost:5050
|
- API_HOST=http://ec2-3-121-130-58.eu-central-1.compute.amazonaws.com/ff-api
|
||||||
|
labels:
|
||||||
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.ff-frontend.rule=PathPrefix(`/ff`)"
|
||||||
|
- "traefik.http.routers.ff-frontend.entrypoints=web"
|
||||||
|
- "traefik.http.services.ff-frontend.loadbalancer.server.port=80"
|
||||||
|
- "traefik.http.middlewares.ff-frontend-stripprefix.stripprefix.prefixes=/ff"
|
||||||
|
- "traefik.http.routers.ff-frontend.middlewares=ff-frontend-stripprefix"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
- app-network
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:17-alpine
|
image: postgres:17-alpine
|
||||||
env_file:
|
env_file:
|
||||||
- .env
|
- .env
|
||||||
# ports:
|
|
||||||
# - "5432:5432"
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U admin"]
|
test: ["CMD-SHELL", "pg_isready -U admin"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
|
volumes:
|
||||||
|
- db_data:/var/lib/postgresql/data
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
coordinator:
|
coordinator:
|
||||||
build:
|
build:
|
||||||
|
|
@ -35,8 +45,16 @@ services:
|
||||||
interval: 20s
|
interval: 20s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
retries: 10
|
retries: 10
|
||||||
ports:
|
labels:
|
||||||
- 5050:5000
|
- "traefik.enable=true"
|
||||||
|
- "traefik.http.routers.ff-api.rule=PathPrefix(`/ff-api`)"
|
||||||
|
- "traefik.http.routers.ff-api.entrypoints=web"
|
||||||
|
- "traefik.http.services.ff-api.loadbalancer.server.port=5000"
|
||||||
|
- "traefik.http.middlewares.ff-api-stripprefix.stripprefix.prefixes=/ff-api"
|
||||||
|
- "traefik.http.routers.ff-api.middlewares=ff-api-stripprefix"
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
- app-network
|
||||||
|
|
||||||
ocr:
|
ocr:
|
||||||
build:
|
build:
|
||||||
|
|
@ -48,18 +66,18 @@ services:
|
||||||
- EXXETA_SERVICE_URL=http://exxeta:5000/extract
|
- EXXETA_SERVICE_URL=http://exxeta:5000/extract
|
||||||
- SPACY_SERVICE_URL=http://spacy:5052/extract
|
- SPACY_SERVICE_URL=http://spacy:5052/extract
|
||||||
- COORDINATOR_URL=http://coordinator:5000
|
- COORDINATOR_URL=http://coordinator:5000
|
||||||
ports:
|
networks:
|
||||||
- 5051:5000
|
- app-network
|
||||||
|
|
||||||
spacy:
|
spacy:
|
||||||
build:
|
build:
|
||||||
context: backend/spacy-service
|
context: backend/spacy-service
|
||||||
environment:
|
environment:
|
||||||
- VALIDATE_SERVICE_URL=http://validate:5000/validate
|
- VALIDATE_SERVICE_URL=http://validate:5000/validate
|
||||||
ports:
|
|
||||||
- 5052:5052
|
|
||||||
volumes:
|
volumes:
|
||||||
- ./backend/spacy-service/spacy_training:/app/spacy_training
|
- ./backend/spacy-service/spacy_training:/app/spacy_training
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
exxeta:
|
exxeta:
|
||||||
build:
|
build:
|
||||||
|
|
@ -70,8 +88,8 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- VALIDATE_SERVICE_URL=http://validate:5000/validate
|
- VALIDATE_SERVICE_URL=http://validate:5000/validate
|
||||||
- COORDINATOR_URL=http://coordinator:5000
|
- COORDINATOR_URL=http://coordinator:5000
|
||||||
ports:
|
networks:
|
||||||
- 5053:5000
|
- app-network
|
||||||
|
|
||||||
validate:
|
validate:
|
||||||
build:
|
build:
|
||||||
|
|
@ -81,5 +99,14 @@ services:
|
||||||
- .env
|
- .env
|
||||||
environment:
|
environment:
|
||||||
- COORDINATOR_URL=http://coordinator:5000
|
- COORDINATOR_URL=http://coordinator:5000
|
||||||
ports:
|
networks:
|
||||||
- 5054:5000
|
- app-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
proxy:
|
||||||
|
external: true
|
||||||
|
app-network:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
db_data:
|
||||||
|
|
@ -4,6 +4,7 @@ server {
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|
||||||
|
add_header Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: https:; font-src 'self' data: https:; connect-src 'self' https:; object-src 'none'; media-src 'self'; frame-src 'self';";
|
||||||
# Caching configuration for static assets
|
# Caching configuration for static assets
|
||||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||||
expires 30d;
|
expires 30d;
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ export default function UploadPage() {
|
||||||
const uploadFile = useCallback(async () => {
|
const uploadFile = useCallback(async () => {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", files[0]);
|
formData.append("file", files[0]);
|
||||||
const response = await fetch(`${API_HOST}/api/pitch_book`, {
|
const response = await fetch(`${API_HOST}/api/pitch_book/`, {
|
||||||
method: "POST",
|
method: "POST",
|
||||||
body: formData,
|
body: formData,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -6,5 +6,5 @@ import { API_HOST } from "./util/api";
|
||||||
|
|
||||||
const url = new URL(API_HOST);
|
const url = new URL(API_HOST);
|
||||||
export const socket = io(`${url.host}`, {
|
export const socket = io(`${url.host}`, {
|
||||||
path: `${url.pathname.replace(/^\/+/, "")}/socket.io`,
|
path: `${url.pathname}/socket.io`,
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import { defineConfig } from "vite";
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
base: "/ff/",
|
||||||
plugins: [TanStackRouterVite({ autoCodeSplitting: true }), viteReact()],
|
plugins: [TanStackRouterVite({ autoCodeSplitting: true }), viteReact()],
|
||||||
build: {
|
build: {
|
||||||
chunkSizeWarningLimit: 1000, // default ist 500
|
chunkSizeWarningLimit: 1000, // default ist 500
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue