From 0f34300a8aa88d4fb3f2c0817c3943fcad4267ab Mon Sep 17 00:00:00 2001 From: "Ricardo (XenGi) Band" Date: Thu, 19 Oct 2023 17:58:36 +0200 Subject: [PATCH] switch to go --- Dockerfile | 40 ---------------------------------------- bun.lockb | Bin 2743 -> 0 bytes flake.nix | 2 +- go.mod | 3 +++ package.json | 21 --------------------- server.ts | 32 -------------------------------- tsconfig.json | 22 ---------------------- 7 files changed, 4 insertions(+), 116 deletions(-) delete mode 100644 Dockerfile delete mode 100755 bun.lockb create mode 100644 go.mod delete mode 100644 package.json delete mode 100644 server.ts delete mode 100644 tsconfig.json diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index 7693d73..0000000 --- a/Dockerfile +++ /dev/null @@ -1,40 +0,0 @@ -# use the official Bun image -# see all versions at https://hub.docker.com/r/oven/bun/tags -FROM docker.io/oven/bun:1 as base -WORKDIR /usr/src/app - -# install dependencies into temp directory -# this will cache them and speed up future builds -FROM base AS install -RUN mkdir -p /temp/dev -COPY package.json bun.lockb /temp/dev/ -RUN cd /temp/dev && bun install --frozen-lockfile - -# install with --production (exclude devDependencies) -RUN mkdir -p /temp/prod -COPY package.json bun.lockb /temp/prod/ -RUN cd /temp/prod && bun install --frozen-lockfile --production - -# copy node_modules from temp directory -# then copy all (non-ignored) project files into the image -FROM install AS prerelease -COPY --from=install /temp/dev/node_modules node_modules -COPY . . - -# [optional] tests & build -ENV NODE_ENV=production -RUN bun test -RUN bun run build - -# copy production dependencies and source code into final image -FROM base AS release -COPY --from=install /temp/prod/node_modules node_modules -COPY --from=prerelease /usr/src/app/index.ts . -COPY --from=prerelease /usr/src/app/package.json . - -# run the app -USER bun -EXPOSE 8000/tcp -EXPOSE 8080/tcp -ENTRYPOINT [ "bun", "run", "index.ts" ] - diff --git a/bun.lockb b/bun.lockb deleted file mode 100755 index 0b96ba4ffbeabf03d5d2803c8bf63807d2fbe605..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2743 zcmY#Z)GsYA(of3F(@)JSQ%EY!;{sycoc!eMw9K4T-L(9o+{6;yG6OCq1_p+>JuxSk z6r^Ubc%M95z5Jc$cP0Nf)~^hrPamHfn%LdZrp^Ua1O#jlih%=-Zh-RhUef zjz-!qR&?=SyT(>f{U-fvhtO-K`Kk>%+O4Tcj3A8^0FbXiKp2RPf%XdlX_y#DoDhJi z4FW230O|+1hlP+PBzc(r)j%;Tpng*Hf{cObe+tzP3lDe%fE3{YF#Xy*MqyqOojDP}g_(vtjbX}B$G zSF?Y-B+zXzbCJW3WxDo8o2>tlKeDI3+{Us0N>QoIb#pBZCN&nDcN6<=Jc(BMsvSDa#1O?&AmBCmwEqdcDZz2`<8a4H*Z`PPfK{qF8*uEvNHjpZ!-3& zZCsYaydgGmVZdS0>lR17XVtvHoJLcc`y9+VCf#Ea44v?)k*EY4;DYt(~Cmoj4)MNA}m8>mWmj1fcMT zl{LvZnR;2pL}~;ogM|f*CSE5(C33n#hz@tw257N!1WI$+6c;7yW#$!^B;vfm#UIR!3aGwcaQ)FnX0fFfKrfiV-C&5~1)y$7 zeFm$i1Q_E?^$he3z@p$94_1?LFy$ncq!t4!M_3&RulwMI2rMPTYC|T*I72-{kZFs6 z_JHb7SpCSvI0+~s02J|nR?Zzz8Z|D8Q*+Bwi}YM8N>YpR5_5t}iZb)k?Gy|V9#KS4nYkY7x-H*vkryL22GUdr0b3XPx)55|&_d4$7}h1}RXO?j#i_c$hEHZ%B_8d_%7CUIb9D{% zOdw{(8H3_ap{7P54kTibRjgZ*pPialjK^TO8lb6gwk}vZ$a#2l!hH?Y31