forked from lumberdev/tesserae
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (21 loc) · 720 Bytes
/
Dockerfile
File metadata and controls
34 lines (21 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
FROM node:lts-alpine AS node
RUN apk add --update \
git
WORKDIR /tesserae/node
# copy package.json for JS deps
COPY ./package.json /tesserae/node
# download JS deps (avoid shadow-cljs downloading them)
RUN npm install
FROM clojure:temurin-18-tools-deps-alpine
WORKDIR /tesserae
COPY --from=node /tesserae/node ./
# copy just deps.edn for clojure deps without busting cache with other files
COPY ./deps.edn /tesserae
# download clojure deps (avoid downloading in CMD step)
# use clojure over clj to avoid rlwrap
RUN clojure -A:shadow-cljs -Stree
# Copy all source code
COPY . /tesserae
# Compile app
RUN clojure -M:shadow-cljs release tesserae --verbose
CMD clojure -M:prod -m tesserae.serve --port $PORT