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:
+15
-1
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user