Rewrite btcprice from Clojure to Python FastAPI
Replace the Clojure Kit application with a Python FastAPI app that produces identical HTML output. WebSocket proxy, Danish number formatting, and HTMX integration all preserved. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+9
-12
@@ -4,25 +4,22 @@ WORKDIR /build
|
||||
COPY package.json package-lock.json ./
|
||||
RUN npm ci
|
||||
COPY resources/css/ resources/css/
|
||||
COPY src/ src/
|
||||
COPY app/ app/
|
||||
COPY tailwind.config.js ./
|
||||
RUN npm run css:build
|
||||
|
||||
FROM clojure:temurin-21-tools-deps-alpine AS build
|
||||
FROM python:3.13-slim
|
||||
|
||||
WORKDIR /build
|
||||
COPY deps.edn build.clj ./
|
||||
RUN clj -Sforce -P
|
||||
COPY . .
|
||||
WORKDIR /app
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY app/ app/
|
||||
COPY resources/public/ resources/public/
|
||||
COPY --from=css /build/resources/public/css/output.css resources/public/css/output.css
|
||||
RUN clj -T:build all
|
||||
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
|
||||
COPY --from=build /build/target/btcprice-standalone.jar /btcprice/btcprice-standalone.jar
|
||||
|
||||
EXPOSE 4040
|
||||
ENV PORT=4040
|
||||
ENV BTCDATA_URL=http://btcdata:4101
|
||||
|
||||
CMD ["java", "-jar", "/btcprice/btcprice-standalone.jar"]
|
||||
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "4040"]
|
||||
|
||||
Reference in New Issue
Block a user