1
0
mirror of https://github.com/alexandrev/xslt-lab.git synced 2026-09-20 04:23:16 +00:00

Add Dockerfile for frontend

This commit is contained in:
2025-07-01 09:39:15 +02:00
parent 09a8f99466
commit b56df065bf
4 changed files with 26 additions and 3 deletions
+13
View File
@@ -0,0 +1,13 @@
# Stage 1: build the frontend
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json ./
RUN npm install
COPY . .
RUN npm run build
# Stage 2: serve the static files
FROM nginx:alpine
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
+1 -1
View File
@@ -110,7 +110,7 @@ export default function App() {
/>
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
<input type="file" accept=".xml" onChange={(e) => loadFile(e, (text) => updateParam(i, 'value', text))} />
<button onClick={() => download(p.value, `${p.name||'param'}.xml`)}>Download</button>
<button onClick={() => download(p.value, `${p.name || "param"}.xml`)}>Download</button>
</div>
</div>
)