Update Dockerfile with Tailwind build stage and prod database

Add Node.js stage for CSS build, cache Clojure deps in separate layer,
add .dockerignore, and default JDBC_URL to btcprod database.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-17 16:36:38 +01:00
co-authored by Claude Opus 4.6
parent 8169796eb9
commit 201155c0b2
2 changed files with 20 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
target/
node_modules/
.env
.cpcache/
.nrepl-port
+15 -1
View File
@@ -1,8 +1,21 @@
FROM node:22-alpine AS css
WORKDIR /build
COPY package.json package-lock.json ./
RUN npm ci
COPY resources/css/ resources/css/
COPY src/ src/
COPY tailwind.config.js ./
RUN npm run css:build
FROM clojure:openjdk-25 AS build
WORKDIR /build
COPY deps.edn build.clj ./
RUN clj -Sforce -P
COPY . .
RUN clj -Sforce -T:build all
COPY --from=css /build/resources/public/css/output.css resources/public/css/output.css
RUN clj -T:build all
FROM azul/zulu-openjdk-alpine:25
@@ -10,5 +23,6 @@ COPY --from=build /build/target/btcprice-standalone.jar /btcprice/btcprice-stand
EXPOSE 4040
ENV PORT=4040
ENV JDBC_URL=jdbc:postgresql://postgres:5432/btcprod
CMD ["java", "-jar", "/btcprice/btcprice-standalone.jar"]