Upgrade to Bun 1.0 (#1)
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com> Reviewed-on: https://git.jvalver.de/Thilawyn/drone-better-docker-autotag/pulls/1
This commit was merged in pull request #1.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
local bun_image = "oven/bun:0.8.1";
|
||||
local bun_image = "oven/bun:1.0";
|
||||
|
||||
|
||||
local fetch_step = {
|
||||
@@ -7,12 +7,12 @@ local fetch_step = {
|
||||
commands: ["git fetch --tags"],
|
||||
};
|
||||
|
||||
local install_run_step = {
|
||||
name: "install-run",
|
||||
local generate_docker_tags_step = {
|
||||
name: "generate-docker-tags",
|
||||
image: bun_image,
|
||||
commands: [
|
||||
"apt update -y && apt full-upgrade -y && apt install -y --reinstall ca-certificates && apt install -y --no-install-recommends git",
|
||||
"bun install --production --frozen-lockfile --no-cache",
|
||||
"apt-get update && apt-get install -y --reinstall --no-install-recommends ca-certificates && apt-get install -y --no-install-recommends git",
|
||||
"bun install --frozen-lockfile --no-cache --production",
|
||||
"bun start .",
|
||||
],
|
||||
};
|
||||
@@ -50,7 +50,7 @@ local build_docker_step(publish) = {
|
||||
|
||||
steps: [
|
||||
fetch_step,
|
||||
install_run_step,
|
||||
generate_docker_tags_step,
|
||||
build_docker_step(false),
|
||||
],
|
||||
},
|
||||
@@ -72,7 +72,7 @@ local build_docker_step(publish) = {
|
||||
|
||||
steps: [
|
||||
fetch_step,
|
||||
install_run_step,
|
||||
generate_docker_tags_step,
|
||||
build_docker_step(true),
|
||||
],
|
||||
},
|
||||
|
||||
19
Dockerfile
19
Dockerfile
@@ -1,15 +1,14 @@
|
||||
FROM oven/bun:0.8.1
|
||||
FROM oven/bun:1.0
|
||||
|
||||
RUN apt update -y && \
|
||||
apt full-upgrade -y && \
|
||||
apt install -y --reinstall ca-certificates && \
|
||||
apt install -y --no-install-recommends git && \
|
||||
apt autoremove -y --purge && \
|
||||
apt clean
|
||||
|
||||
COPY ./docker-entrypoint.sh /usr/local/bin
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --reinstall --no-install-recommends ca-certificates && \
|
||||
apt-get install -y --no-install-recommends git && \
|
||||
apt-get autoremove -y --purge && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY ./ ./
|
||||
RUN bun install --production --frozen-lockfile --no-cache && \
|
||||
RUN bun install --frozen-lockfile --no-cache --production && \
|
||||
rm -rf ~/.bun
|
||||
ENTRYPOINT ["bun", "--cwd=/app", "start", "/drone/src"]
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
set -e
|
||||
|
||||
cd /app
|
||||
exec bun start /drone/src
|
||||
18
package.json
18
package.json
@@ -7,17 +7,17 @@
|
||||
"start:dev": "NODE_ENV=development bun src/index.ts"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/lodash-es": "^4.17.8",
|
||||
"@types/semver": "^7.5.0",
|
||||
"bun-types": "latest",
|
||||
"type-fest": "^4.2.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"typescript": "^5.0.0"
|
||||
"@types/lodash-es": "^4.17.9",
|
||||
"@types/semver": "^7.5.1",
|
||||
"bun-types": "^1.0.1",
|
||||
"npm-check-updates": "^16.13.3",
|
||||
"npm-sort": "^0.0.4",
|
||||
"type-fest": "^4.3.1",
|
||||
"typescript": "^5.2.2"
|
||||
},
|
||||
"dependencies": {
|
||||
"@effect/schema": "^0.33.2",
|
||||
"effect": "^2.0.0-next.29",
|
||||
"@effect/schema": "^0.35.0",
|
||||
"effect": "^2.0.0-next.31",
|
||||
"lodash-es": "^4.17.21",
|
||||
"semver": "^7.5.4",
|
||||
"simple-git": "^3.19.1",
|
||||
|
||||
Reference in New Issue
Block a user