- connect_frontend/order-app at /order/{site}: menu per service at that service's prices,
extras, basket (kept per tab), checkout priced by the cloud (fee, area by list or
postcode, minimum), name/phone/address/notes (remembered), as soon as possible or a time
slot, tracking page with steps, lines and totals; en/el; tokens in index.css. Logic in
src/logic.js, unit-tested; built and served by the connect image (npm test in the build).
- services/ordering.py: the venue's services, hours (past midnight), preparation, slot grid,
days ahead, ASAP; takeaway/delivery orders checked (order.service_unavailable,
order.closed, order.time_invalid) and need a phone; GET /api/orders/{site}/slots; the
public menu carries the ordering summary.
- services/ratelimit.py: per-caller limits on quote, order and track (429 rate.limited).
- online_orders.requested_for (0003, unreleased) stored as UTC; every datetime sent with its
offset (the database keeps no zone: a 12:00 Athens slot came back as 12:00 unzoned).
- Tracking returns what was ordered, the totals, the type and the time.
- Tests: test_ordering.py (5), checkout/fees updated; order-app unit (4).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
37 lines
1.1 KiB
Docker
37 lines
1.1 KiB
Docker
# Build menu-app
|
|
FROM node:20-alpine AS menu-builder
|
|
WORKDIR /app/menu-app
|
|
COPY menu-app/package.json .
|
|
RUN npm install
|
|
COPY menu-app/ .
|
|
ARG VITE_CLOUD_URL=
|
|
ENV VITE_CLOUD_URL=$VITE_CLOUD_URL
|
|
RUN npm run build
|
|
|
|
# Build order-app (online ordering: takeaway and delivery, plan phase 3S S.4)
|
|
FROM node:20-alpine AS order-builder
|
|
WORKDIR /app/order-app
|
|
COPY order-app/package.json order-app/package-lock.json ./
|
|
RUN npm ci
|
|
COPY order-app/ .
|
|
ARG VITE_CLOUD_URL=
|
|
ENV VITE_CLOUD_URL=$VITE_CLOUD_URL
|
|
RUN npm test && npm run build
|
|
|
|
# Build manager-app
|
|
FROM node:20-alpine AS manager-builder
|
|
WORKDIR /app/manager-app
|
|
COPY manager-app/package.json .
|
|
RUN npm install
|
|
COPY manager-app/ .
|
|
ARG VITE_CLOUD_URL=
|
|
ENV VITE_CLOUD_URL=$VITE_CLOUD_URL
|
|
RUN npm run build
|
|
|
|
# Serve them with nginx
|
|
FROM nginx:alpine
|
|
COPY --from=menu-builder /app/menu-app/dist /usr/share/nginx/html/menu
|
|
COPY --from=manager-builder /app/manager-app/dist /usr/share/nginx/html/manage
|
|
COPY --from=order-builder /app/order-app/dist /usr/share/nginx/html/order
|
|
COPY nginx-connect.conf /etc/nginx/conf.d/default.conf
|