diff --git a/.do/app.yaml b/.do/app.yaml index 37b9e41..10a6629 100644 --- a/.do/app.yaml +++ b/.do/app.yaml @@ -1,6 +1,20 @@ name: kiddos region: nyc +# Ingress rules to route traffic properly +ingress: + rules: + - match: + path: + prefix: /api + component: + name: backend + - match: + path: + prefix: / + component: + name: frontend + # Backend Service services: - name: backend @@ -45,7 +59,7 @@ services: value: ${INITIAL_ADMIN_PASSWORD} type: SECRET - key: CORS_ORIGIN - value: ${frontend.PUBLIC_URL} + value: ${APP_URL} health_check: http_path: /api/health @@ -64,10 +78,7 @@ static_sites: envs: - key: VITE_API_URL - value: ${backend.PUBLIC_URL}/api + value: ${APP_URL}/api - routes: - - path: / - catchall_document: index.html diff --git a/frontend/package.json b/frontend/package.json index 1dd0a51..5f6b06f 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -16,6 +16,7 @@ "@types/react": "^18.2.43", "@types/react-dom": "^18.2.17", "@types/react-router-dom": "^5.3.3", + "@types/node": "^20.10.5", "@vitejs/plugin-react": "^4.2.1", "typescript": "^5.3.3", "vite": "^5.0.8"