aboutsummaryrefslogtreecommitdiff
path: root/Earthfile
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-06-23 06:57:07 +0000
committerFuwn <[email protected]>2024-06-23 06:57:07 +0000
commit74f1bfd0c1971ede4a8db3276f918dcbb0543acf (patch)
treeccf713e5d698d612a1e26e0966bcf576f82f9a03 /Earthfile
downloadmomoka-74f1bfd0c1971ede4a8db3276f918dcbb0543acf.tar.xz
momoka-74f1bfd0c1971ede4a8db3276f918dcbb0543acf.zip
feat: initial releasev1.0.0
Diffstat (limited to 'Earthfile')
-rw-r--r--Earthfile39
1 files changed, 39 insertions, 0 deletions
diff --git a/Earthfile b/Earthfile
new file mode 100644
index 0000000..fdf39f0
--- /dev/null
+++ b/Earthfile
@@ -0,0 +1,39 @@
+VERSION 0.8
+
+all:
+ BUILD +docker
+
+docker:
+ ARG tag=latest
+
+ FROM ghcr.io/gleam-lang/gleam:v1.2.1-erlang-alpine
+
+ COPY +build/erlang-shipment/ /momoka/erlang-shipment/
+
+ WORKDIR /momoka/
+
+ ENTRYPOINT ["./erlang-shipment/entrypoint.sh"]
+
+ CMD ["run"]
+
+ SAVE IMAGE --push fuwn/momoka:${tag}
+
+deps:
+ FROM ghcr.io/gleam-lang/gleam:v1.2.0-erlang-alpine
+
+ RUN apk add --no-cache build-base
+
+build:
+ FROM +deps
+
+ WORKDIR /momoka/
+
+ COPY src/ /momoka/src/
+ COPY gleam.toml /momoka/
+ COPY manifest.toml /momoka/
+
+ RUN gleam build \
+ && cd build/ \
+ && gleam export erlang-shipment
+
+ SAVE ARTIFACT /momoka/build/erlang-shipment/