From 1f5d68d873798b7d33c645da1d7cce51839b2acd Mon Sep 17 00:00:00 2001 From: Elizabeth Hunt Date: Sun, 15 Dec 2024 00:52:32 -0800 Subject: [PATCH] arm? --- .drone.yml | 17 ++++++++++++++++- Dockerfile | 14 ++++++++++++-- 2 files changed, 28 insertions(+), 3 deletions(-) diff --git a/.drone.yml b/.drone.yml index d6d2cfe..703612d 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,15 +4,30 @@ type: docker name: deploy steps: - - name: docker + - name: docker-arm image: plugins/docker settings: + target: arm username: from_secret: gitea_packpub_username password: from_secret: gitea_packpub_password registry: git.simponic.xyz repo: git.simponic.xyz/simponic/uptime + tags: + - arm + - name: docker-amd64 + image: plugins/docker + settings: + target: eightysix + username: + from_secret: gitea_packpub_username + password: + from_secret: gitea_packpub_password + registry: git.simponic.xyz + repo: git.simponic.xyz/simponic/uptime + tags: + - eightysix trigger: branch: diff --git a/Dockerfile b/Dockerfile index 10ced2a..30392ab 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,16 @@ -FROM oven/bun +FROM oven/bun AS build COPY . /app WORKDIR /app/ RUN bun install RUN bun test -CMD bun run /app/index.ts +RUN bun build /app/index.js --target=bun + +FROM --platform=linux/arm64 oven/bun AS arm +WORKDIR /app +COPY --from=build /app/index.js . +CMD [ "bun", "run", "index.js" ] + +FROM --platform=linux/amd64 oven/bun AS eightysix +WORKDIR /app +COPY --from=build /app/index.js . +CMD [ "bun", "run", "index.js" ]