Files
telemt-api/web/Dockerfile
T
Denozordec ef98560e9f
Publish telemt-api gateway Docker image / test (push) Successful in 24s
Publish telemt-api gateway Docker image / build-and-push (push) Successful in 1m18s
Add CORS support and Docker configuration for web service
- Added CORS allowed origins in config.compose.yaml to enable cross-origin requests from the web service.
- Updated docker-compose.yml to include a new web service with build context and port mapping for local development.
- Enhanced gateway.go to support additional HTTP methods in CORS responses.
- Updated README.md to document the new web service and its configuration requirements.
2026-03-30 10:31:10 +07:00

17 lines
465 B
Docker

# Статическая сборка SvelteKit и раздача через serve
FROM node:22-alpine AS build
WORKDIR /app
ARG PUBLIC_TELEMT_GATEWAY_URL=http://127.0.0.1:8080
ENV PUBLIC_TELEMT_GATEWAY_URL=$PUBLIC_TELEMT_GATEWAY_URL
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM node:22-alpine
RUN npm install -g serve@14
WORKDIR /srv
COPY --from=build /app/build ./build
EXPOSE 4173
CMD ["serve", "-s", "build", "-l", "4173"]