Files
finance/infra/docker/Dockerfile.frontend
T
k1nq d582f15681 feat: add tests for import polling, login page, money utilities, and query keys
- Implemented tests for import polling functionality, ensuring correct behavior for active and terminal import statuses.
- Created tests for the login page, validating user interactions and error handling.
- Added unit tests for money utility functions, covering parsing, formatting, and summation of monetary values.
- Developed tests for query keys, ensuring proper scoping and invalidation roots.

chore: setup testing environment and configuration

- Added setup file for testing with Vitest and Testing Library.
- Configured TypeScript and Vite for the frontend project.
- Created Docker and Nginx configurations for local development and production environments.
- Established a PostgreSQL initialization script for setting up application roles.

docs: add README and environment configuration for infra

- Included README for the infra directory, detailing local development setup and service descriptions.
- Created an example environment configuration file for local development with placeholders for sensitive information.
2026-09-14 09:26:33 +05:00

34 lines
1.1 KiB
Docker

# Provider-neutral production image for the frontend: static SPA build served
# by nginx, which also reverse-proxies /api/v1 to the API (same origin).
#
# Build contract (owned with the frontend team, see infra/README.md):
# - build context is frontend/ and must contain package.json, pnpm-lock.yaml
# - `pnpm build` emits the production bundle to frontend/dist
# - the named context "infra" must point at infra/ (Compose sets it; CLI
# builds pass --build-context infra=./infra)
#
# Build:
# docker build -f infra/docker/Dockerfile.frontend \
# --build-context infra=./infra -t finance-frontend:local frontend
FROM node:22-alpine AS build
WORKDIR /app
RUN corepack enable
COPY package.json pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
RUN pnpm build
FROM nginx:1.27-alpine AS runtime
COPY --from=infra infra/nginx/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
HEALTHCHECK --interval=10s --timeout=3s --start-period=5s --retries=12 \
CMD wget -q --spider http://127.0.0.1/ || exit 1