From 38055c6698113288fcc8e4713daaa9124dbcbf68 Mon Sep 17 00:00:00 2001 From: Justin van Elst Date: Fri, 22 Sep 2023 12:16:52 +0200 Subject: [PATCH] Add Bun support --- bin/dev | 1 + bin/dev_command/bun | 11 +++++++++++ build/dist/bun/Dockerfile | 21 +++++++++++++++++++++ build/dist/bun/php | 3 +++ build/dist/docker-compose-bun.yml | 5 +++++ 5 files changed, 41 insertions(+) create mode 100644 bin/dev_command/bun create mode 100644 build/dist/bun/Dockerfile create mode 100755 build/dist/bun/php create mode 100644 build/dist/docker-compose-bun.yml diff --git a/bin/dev b/bin/dev index ade2466..df0f0a8 100755 --- a/bin/dev +++ b/bin/dev @@ -187,6 +187,7 @@ dc() { yml 'build/dist/docker-compose-ngrok.yml'; yml 'build/dist/docker-compose-ctop.yml'; yml 'build/dist/docker-compose-node.yml'; + yml 'build/dist/docker-compose-bun.yml'; yml 'build/dist/docker-compose-expose.yml'; } diff --git a/bin/dev_command/bun b/bin/dev_command/bun new file mode 100644 index 0000000..89447ed --- /dev/null +++ b/bin/dev_command/bun @@ -0,0 +1,11 @@ + +dc yml 'build/dist/docker-compose-bun.yml'; +dc service bun; + +dc nodeps; +dc interactive; +dc projectpath; +dc user; + +dc run "$@"; +return $?; \ No newline at end of file diff --git a/build/dist/bun/Dockerfile b/build/dist/bun/Dockerfile new file mode 100644 index 0000000..9fcc727 --- /dev/null +++ b/build/dist/bun/Dockerfile @@ -0,0 +1,21 @@ +ARG FROM_IMAGE=oven/bun +ARG FROM_TAG=latest + +FROM ${FROM_IMAGE}:${FROM_TAG} +LABEL maintainer="Jeroen Boersma " + +RUN bun add --global\ + webpack webpack-cli webpack-dev-server\ + eslint-plugin-import eslint-plugin-promise\ + eslint eslint-config-standard eslint-plugin-node eslint-plugin-react eslint-plugin-standard + +COPY ./php /usr/local/bin/ + +ARG GID=1000 +ARG UID=1000 + +WORKDIR /data + +RUN groupmod -g $GID bun && \ + usermod -g $GID -u $UID bun + diff --git a/build/dist/bun/php b/build/dist/bun/php new file mode 100755 index 0000000..d4cf025 --- /dev/null +++ b/build/dist/bun/php @@ -0,0 +1,3 @@ +#!/bin/sh +echo "RUN PHP COMMANDS MANUALLY"; +echo "$@"; diff --git a/build/dist/docker-compose-bun.yml b/build/dist/docker-compose-bun.yml new file mode 100644 index 0000000..4443e9f --- /dev/null +++ b/build/dist/docker-compose-bun.yml @@ -0,0 +1,5 @@ +services: + bun: + build: build/dist/bun + volumes: + - dockerdev-workspace-volume:/data \ No newline at end of file