- api/: FastAPI app with MySQL (accounts, forwarding_rules, messages)
- GET/POST/PUT/DELETE /accounts + /accounts/{id}/test
- GET /messages + /messages/{id}/retry
- GET /stats
- POST /connection/test
- Auto-runs migrations/init.sql on startup
- worker/: Python IMAP poller + BizDocs upload (schedule every 5 min)
- web/: multi-stage Dockerfile — builds admin-ui via Node, serves via nginx
- nginx proxies /api/ → api:8000, SPA fallback for React Router
- docker-compose.yml: updated web build context + mysql init.sql mount
Co-Authored-By: Paperclip <[email protected]>
18 lines
360 B
Docker
18 lines
360 B
Docker
# Build stage — compile the React admin UI
|
|
FROM node:20-alpine AS builder
|
|
|
|
WORKDIR /build
|
|
COPY admin-ui/package*.json ./
|
|
RUN npm ci
|
|
|
|
COPY admin-ui/ ./
|
|
RUN npm run build
|
|
|
|
# Runtime stage — nginx serving static assets
|
|
FROM nginx:1.27-alpine
|
|
|
|
COPY --from=builder /build/dist /usr/share/nginx/html
|
|
COPY web/nginx.conf /etc/nginx/conf.d/default.conf
|
|
|
|
EXPOSE 80
|