Add production Docker setup and update backend/frontend configs
Introduces .dockerignore, production Dockerfile and nginx config for frontend, and refactors docker-compose.yml for multi-service deployment. Updates backend and frontend code to support public API tagging, improves refund handling, adds test email endpoint, and migrates Orval config to TypeScript. Removes unused frontend Dockerfile and updates dependencies for React Query and Orval.
This commit is contained in:
59
frontend/orval.config.ts
Normal file
59
frontend/orval.config.ts
Normal file
@@ -0,0 +1,59 @@
|
||||
import { defineConfig } from "orval";
|
||||
import "dotenv/config";
|
||||
|
||||
const backendUrl = process.env.VITE_API_BASE_URL || "http://localhost:8000";
|
||||
|
||||
// může se hodit pokud nechceme při buildu generovat klienta (nechat false pro produkci nebo vynechat)
|
||||
const SKIP_ORVAL = process.env.SKIP_ORVAL === "true";
|
||||
|
||||
if (SKIP_ORVAL){
|
||||
|
||||
}
|
||||
export default defineConfig({
|
||||
public: {
|
||||
input: {
|
||||
target: `${backendUrl}/api/schema/`,
|
||||
|
||||
filters: {
|
||||
mode: "include",
|
||||
tags: ["public"],
|
||||
},
|
||||
},
|
||||
output: {
|
||||
target: "src/api/generated/public.ts",
|
||||
schemas: "src/api/generated/public/models",
|
||||
|
||||
client: "react-query",
|
||||
httpClient: "axios",
|
||||
|
||||
override: {
|
||||
mutator: {
|
||||
path: "src/api/publicClient.ts", //IMPORTANTE
|
||||
name: "publicApi",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
private: {
|
||||
input: {
|
||||
target: `${backendUrl}/api/schema/`
|
||||
|
||||
// No filters, include all endpoints
|
||||
},
|
||||
output: {
|
||||
|
||||
target: "src/api/generated/private.ts", //IMPORTANTE
|
||||
schemas: "src/api/generated/private/models",
|
||||
|
||||
client: "react-query",
|
||||
httpClient: "axios",
|
||||
|
||||
override: {
|
||||
mutator: {
|
||||
path: "src/api/privateClient.ts",
|
||||
name: "privateApi",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user