diff options
-rw-r--r-- | .dockerignore | 1 | ||||
-rw-r--r-- | Dockerfile | 27 | ||||
-rw-r--r-- | docker-compose.yml | 7 |
3 files changed, 35 insertions, 0 deletions
diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..cf70988 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +**/node_modules diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8ae933f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM clojure:tools-deps-alpine as build + +RUN mkdir /app +WORKDIR /app + +RUN apk add npm + +COPY package* /app/ +RUN npm install + +COPY . /app +RUN npm run build +RUN clojure -M:frontend release tubo + +FROM clojure:tools-deps-alpine +RUN mkdir /app +WORKDIR /app +COPY deps.edn /app + +RUN clojure -P + +COPY . /app +COPY --from=build /app/resources /app/resources + +EXPOSE 3000 + +CMD clojure -M:run diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e16485c --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3" +services: + tubo: + build: . + restart: unless-stopped + ports: + - 3000:3000 |