85455f3271
- Add root .gitignore to prevent btc_wallet.py (with RPC credentials) from being committed - Load JWT SECRET_KEY from environment variable instead of hardcoded value - Restrict CORS to explicit methods/headers instead of wildcards - Add Pydantic Field validation (gt=0) to purchase amounts and user credentials - Add logging to all silent exception handlers in btc.py - Run backend and frontend Docker containers as non-root appuser - Add .dockerignore for both backend and frontend - Pass SECRET_KEY env var through docker-compose; add healthchecks to both services - Update bcrypt from pinned 3.2.2 to >=4.0.0 - Capture error objects in frontend catch blocks; check admin delete response Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
450 B
Docker
20 lines
450 B
Docker
FROM node:18-alpine AS build
|
|
|
|
WORKDIR /app
|
|
COPY package.json ./
|
|
RUN npm install
|
|
COPY . .
|
|
ARG REACT_APP_API_URL=http://localhost:8000
|
|
ENV REACT_APP_API_URL=$REACT_APP_API_URL
|
|
RUN npm run build
|
|
|
|
FROM node:18-alpine
|
|
RUN npm install -g serve
|
|
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
|
|
WORKDIR /app
|
|
COPY --from=build /app/build ./build
|
|
RUN chown -R appuser:appgroup /app
|
|
USER appuser
|
|
EXPOSE 3001
|
|
CMD ["serve", "-s", "build", "-l", "3001"]
|