mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-27 03:14:11 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3737418ec3 | ||
|
|
6d47ea7466 | ||
|
|
84d96ff83a | ||
|
|
6e985aed61 | ||
|
|
8347a9ca15 | ||
|
|
ab9b33320d | ||
|
|
efd6163238 | ||
|
|
0e4bdec0e3 | ||
|
|
0eb03b16a4 | ||
|
|
b216773044 | ||
|
|
92801ba14a | ||
|
|
661e836f06 | ||
|
|
fb5c7ecabe | ||
|
|
a390643458 |
@@ -1,4 +1,6 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
dist
|
||||||
|
data
|
||||||
Dockerfile*
|
Dockerfile*
|
||||||
docker-compose*
|
docker-compose*
|
||||||
.dockerignore
|
.dockerignore
|
||||||
|
|||||||
@@ -47,6 +47,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
socat \
|
socat \
|
||||||
ca-certificates \
|
ca-certificates \
|
||||||
bubblewrap \
|
bubblewrap \
|
||||||
|
gosu \
|
||||||
&& apt-get clean \
|
&& apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
@@ -69,5 +70,12 @@ COPY --chown=bun:bun --from=builder /app/prisma.config.ts.prod ./prisma.config.t
|
|||||||
# Expose port (Bun Hono defaults to 3000)
|
# Expose port (Bun Hono defaults to 3000)
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
|
# Switch back to root at the end so the container runs the entrypoint as root
|
||||||
|
USER root
|
||||||
|
COPY scripts/docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
|
||||||
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||||
|
|
||||||
|
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||||
|
|
||||||
# Default command: run migrations and start API server
|
# Default command: run migrations and start API server
|
||||||
CMD ["sh", "-c", "bun prisma migrate deploy && bun index.js"]
|
CMD ["sh", "-c", "bun prisma migrate deploy && bun index.js"]
|
||||||
|
|||||||
@@ -49,13 +49,32 @@ Docker Compose is the fastest way to get Shumai running. You do not need to clon
|
|||||||
```bash
|
```bash
|
||||||
curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml
|
curl -o docker-compose.yaml https://raw.githubusercontent.com/shumaiOne/shumai/main/docker-compose/local/docker-compose.yaml
|
||||||
```
|
```
|
||||||
3. **Configure Environment Variables (Remote Deployments only):**
|
3. Configure environment variables (optional):
|
||||||
If deploying Shumai to a remote server (e.g., AWS EC2, VPS), edit docker-compose.yaml and add AWS_ENDPOINT_URL_S3 under the environment section, setting it to your server's public IP address or domain name (e.g., http://12.34.56.78).
|
|
||||||
4. Start the services in detached mode:
|
* `SHUMAI_SERVER_PORT` controls the port the Shumai server listens on. The default is `3000`.
|
||||||
|
* By default, Shumai uses the bundled local storage service in this Docker Compose setup. To use an external S3-compatible storage instead, set `AWS_ENDPOINT_URL_S3` to the provider's endpoint URL and configure the corresponding AWS credentials and bucket settings as needed.
|
||||||
|
```
|
||||||
|
AWS_ENDPOINT_URL_S3: S3_ENDPOINT_URL
|
||||||
|
S3_REGION: S3_REGION
|
||||||
|
S3_BUCKET: BUCKET_NAME
|
||||||
|
S3_ACCESS_KEY_ID: ID
|
||||||
|
S3_SECRET_ACCESS_KEY: KEY
|
||||||
|
```
|
||||||
|
* By default, `AWS_ENDPOINT_URL_S3` is set to: `http://localhost:{SHUMAI_SERVER_PORT}`, if you use local storage and expose Shumai on a custom host/port combination, set `AWS_ENDPOINT_URL_S3` to the external URL that browsers will use to upload files.
|
||||||
|
|
||||||
|
For example, if you change the port mapping in `docker-compose.yaml` from `3000:3000` to `12345:3000` and deploy on a server with IP address `12.34.56.78`, set:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
AWS_ENDPOINT_URL_S3=http://12.34.56.78:12345
|
||||||
|
```
|
||||||
|
|
||||||
|
This value must be reachable from client browsers and should include the externally exposed port.
|
||||||
|
|
||||||
|
5. Start the services in detached mode:
|
||||||
```bash
|
```bash
|
||||||
docker compose up -d
|
docker compose up -d
|
||||||
```
|
```
|
||||||
5. Open your browser and access Shumai at `http://localhost:3000` (or `http://<your-server-ip>:3000` for remote deployments).
|
6. Open your browser and access Shumai at `http://localhost:3000` (or `http://<your-server-ip>:3000` for remote deployments).
|
||||||
|
|
||||||
### Option 2: Install via NPM / Package Manager
|
### Option 2: Install via NPM / Package Manager
|
||||||
|
|
||||||
@@ -126,11 +145,12 @@ DATABASE_URL=postgresql://shumai:shumai_password@localhost:5432/shumai_db?schema
|
|||||||
BETTER_AUTH_SECRET=ySxs7DxzHDZBbeeHNPEwBuspYwipBqz5Gk5XdBjNhWw=
|
BETTER_AUTH_SECRET=ySxs7DxzHDZBbeeHNPEwBuspYwipBqz5Gk5XdBjNhWw=
|
||||||
STORAGE_BACKEND=local
|
STORAGE_BACKEND=local
|
||||||
SHUMAI_SERVER_PORT=3000
|
SHUMAI_SERVER_PORT=3000
|
||||||
AWS_ENDPOINT_URL_S3=http://localhost
|
AWS_ENDPOINT_URL_S3=http://localhost:3000
|
||||||
```
|
```
|
||||||
|
|
||||||
> [!NOTE]
|
> [!NOTE]
|
||||||
> If deploying on a remote server, update `AWS_ENDPOINT_URL_S3` from `http://localhost` to your server's public IP address or domain name.
|
> `SHUMAI_SERVER_PORT` sets the port the server starts on, while `AWS_ENDPOINT_URL_S3` is used by the browser to build file upload URLs.
|
||||||
|
> If deploying on a remote server (e.g. `http://123.456.7.8`) with a mapped port (e.g. `12345:3000` in docker-compose), set `AWS_ENDPOINT_URL_S3` to `http://123.456.7.8:12345`.
|
||||||
|
|
||||||
#### Step 6: Run Shumai
|
#### Step 6: Run Shumai
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/agent-app",
|
"name": "@shumai/agent-app",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/cli",
|
"name": "@shumai/cli",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/transcode-app",
|
"name": "@shumai/transcode-app",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/web-app",
|
"name": "@shumai/web-app",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|||||||
@@ -27,8 +27,12 @@ services:
|
|||||||
# Database Configuration
|
# Database Configuration
|
||||||
DATABASE_URL: postgres://shumai:shumai_password@shumai_postgres:5432/shumai_db?search_path=public&sslmode=disable
|
DATABASE_URL: postgres://shumai:shumai_password@shumai_postgres:5432/shumai_db?search_path=public&sslmode=disable
|
||||||
|
|
||||||
|
# Server Configuration
|
||||||
|
SHUMAI_SERVER_PORT: 3000
|
||||||
|
|
||||||
# S3 Configuration
|
# S3 Configuration
|
||||||
STORAGE_BACKEND: local
|
STORAGE_BACKEND: local
|
||||||
|
AWS_ENDPOINT_URL_S3: http://localhost:3000
|
||||||
|
|
||||||
# Better Auth
|
# Better Auth
|
||||||
BETTER_AUTH_SECRET: qSxs9DxzHDZBbeeTNPEwBuspYwipBqz5Gk5XdBjNhWw=
|
BETTER_AUTH_SECRET: qSxs9DxzHDZBbeeTNPEwBuspYwipBqz5Gk5XdBjNhWw=
|
||||||
|
|||||||
@@ -37,16 +37,28 @@ Shumai is configured via environment variables. You can define these variables i
|
|||||||
|
|
||||||
Shumai supports storing files locally or on S3-compatible endpoints.
|
Shumai supports storing files locally or on S3-compatible endpoints.
|
||||||
|
|
||||||
| Variable | Description | Example / Default |
|
| Variable | Description | Example / Default |
|
||||||
| :------------------------- | :------------------------------------------------------------------------------------------------ | :--------------------------- |
|
| :------------------------- | :------------------------------------------------------------------------------------------------------------------------------------------------------ | :------------------------------------------------------------------------ |
|
||||||
| `STORAGE_BACKEND` | Storage type. Use `local` for local file system storage, or `s3` for S3-compatible cloud storage. | `local` (default) or `s3` |
|
| `STORAGE_BACKEND` | Storage type. Use `local` for local file system storage, or `s3` for S3-compatible cloud storage. | `local` (default) or `s3` |
|
||||||
| `AWS_ENDPOINT_URL_S3` | Custom endpoint for S3 storage. Must change to public domain/IP if deploying remotely. | `http://localhost` (default) |
|
| `AWS_ENDPOINT_URL_S3` | Endpoint for S3 storage or local storage. Used by the browser to build file upload URLs. Must include port if deploying remotely or using custom ports. | `http://localhost:3000` (respects `SHUMAI_SERVER_PORT` fallback if unset) |
|
||||||
| `S3_BUCKET` | S3 bucket name. | `shumai` (default) |
|
| `S3_BUCKET` | S3 bucket name. | `shumai` (default) |
|
||||||
| `S3_ACCESS_KEY_ID` | Access key credentials for S3. | `minioadmin` (default) |
|
| `S3_ACCESS_KEY_ID` | Access key credentials for S3. | `minioadmin` (default) |
|
||||||
| `S3_SECRET_ACCESS_KEY` | Secret key credentials for S3. | `minioadmin` (default) |
|
| `S3_SECRET_ACCESS_KEY` | Secret key credentials for S3. | `minioadmin` (default) |
|
||||||
| `S3_REGION` | S3 storage region. | `auto` (default) |
|
| `S3_REGION` | S3 storage region. | `auto` (default) |
|
||||||
| `S3_USE_SSL` | Set to `true` to use HTTPS for S3 endpoints. | `false` (default) |
|
| `S3_USE_SSL` | Set to `true` to use HTTPS for S3 endpoints. | `false` (default) |
|
||||||
| `PRESIGNED_URL_EXPIRES_IN` | Number of hours for which generated presigned download/upload links are valid. | `5` (default) |
|
| `PRESIGNED_URL_EXPIRES_IN` | Number of hours for which generated presigned download/upload links are valid. | `5` (default) |
|
||||||
|
|
||||||
|
### Local Storage Port Configuration
|
||||||
|
|
||||||
|
When `STORAGE_BACKEND` is set to `local` (default):
|
||||||
|
|
||||||
|
- `SHUMAI_SERVER_PORT` configures the port on which the Shumai web server starts and listens.
|
||||||
|
- `AWS_ENDPOINT_URL_S3` configures the public/external endpoint used by client browsers to upload and download files. It must include the scheme and port.
|
||||||
|
|
||||||
|
For example, if you deploy Shumai on a remote server at `http://123.456.7.8` and configure port mapping `12345:3000` (exposing port 3000 internally as port 12345 externally) in Docker Compose:
|
||||||
|
|
||||||
|
- Set `SHUMAI_SERVER_PORT` to `3000`.
|
||||||
|
- Set `AWS_ENDPOINT_URL_S3` to `http://123.456.7.8:12345`.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -61,16 +61,23 @@ To handle media processing and security isolation, the host machine must have th
|
|||||||
```
|
```
|
||||||
3. **Configure Environment Variables**:
|
3. **Configure Environment Variables**:
|
||||||
Create a new directory, navigate into it, and create a `.env` file:
|
Create a new directory, navigate into it, and create a `.env` file:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir shumai && cd shumai
|
mkdir shumai && cd shumai
|
||||||
```
|
```
|
||||||
|
|
||||||
Create a `.env` file with the following variables:
|
Create a `.env` file with the following variables:
|
||||||
|
|
||||||
```env
|
```env
|
||||||
DATABASE_URL=postgresql://shumai:shumai_password@localhost:5432/shumai_db?schema=public
|
DATABASE_URL=postgresql://shumai:shumai_password@localhost:5432/shumai_db?schema=public
|
||||||
BETTER_AUTH_SECRET=your-random-32-character-secret-key
|
BETTER_AUTH_SECRET=your-random-32-character-secret-key
|
||||||
STORAGE_BACKEND=local
|
STORAGE_BACKEND=local
|
||||||
AWS_ENDPOINT_URL_S3=http://localhost
|
AWS_ENDPOINT_URL_S3=http://localhost:3000
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> [!TIP]
|
||||||
|
> `AWS_ENDPOINT_URL_S3` must include the scheme and port (e.g. `http://localhost:3000`) where Shumai is publicly accessible. This URL is used directly by client browsers for file uploads.
|
||||||
|
|
||||||
4. **Start Shumai**:
|
4. **Start Shumai**:
|
||||||
|
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "shumai",
|
"name": "shumai",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/agent",
|
"name": "@shumai/agent",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/api",
|
"name": "@shumai/api",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/core",
|
"name": "@shumai/core",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -191,4 +191,39 @@ describe('S3Service implementations', () => {
|
|||||||
await expect(localS3.presign('b', 'k', 'POST')).rejects.toThrow()
|
await expect(localS3.presign('b', 'k', 'POST')).rejects.toThrow()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
describe('s3Service initialization', () => {
|
||||||
|
let originalEnv: NodeJS.ProcessEnv
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
originalEnv = { ...process.env }
|
||||||
|
})
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
process.env = originalEnv
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should initialize LocalStorageService with default localhost and SHUMAI_SERVER_PORT when AWS_ENDPOINT_URL_S3 is not set', async () => {
|
||||||
|
process.env.STORAGE_BACKEND = 'local'
|
||||||
|
delete process.env.AWS_ENDPOINT_URL_S3
|
||||||
|
process.env.SHUMAI_SERVER_PORT = '4567'
|
||||||
|
|
||||||
|
vi.resetModules()
|
||||||
|
const { s3Service } = await import('./s3')
|
||||||
|
const url = await s3Service.presign('bucket', 'key', 'GET')
|
||||||
|
expect(url).toContain('http://localhost:4567')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('should initialize LocalStorageService with exact AWS_ENDPOINT_URL_S3 when it is set', async () => {
|
||||||
|
process.env.STORAGE_BACKEND = 'local'
|
||||||
|
process.env.AWS_ENDPOINT_URL_S3 = 'http://123.456.7.8:12345'
|
||||||
|
process.env.SHUMAI_SERVER_PORT = '4567'
|
||||||
|
|
||||||
|
vi.resetModules()
|
||||||
|
const { s3Service } = await import('./s3')
|
||||||
|
const url = await s3Service.presign('bucket', 'key', 'GET')
|
||||||
|
expect(url).toContain('http://123.456.7.8:12345')
|
||||||
|
expect(url).not.toContain('4567')
|
||||||
|
})
|
||||||
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -452,7 +452,7 @@ export class LocalStorageService implements S3Service {
|
|||||||
|
|
||||||
const storageBackend = process.env.STORAGE_BACKEND || 'local'
|
const storageBackend = process.env.STORAGE_BACKEND || 'local'
|
||||||
const port = process.env.SHUMAI_SERVER_PORT || '3000'
|
const port = process.env.SHUMAI_SERVER_PORT || '3000'
|
||||||
const s3Endpoint = process.env.AWS_ENDPOINT_URL_S3 || 'http://localhost'
|
const s3Endpoint = process.env.AWS_ENDPOINT_URL_S3 || `http://localhost:${port}`
|
||||||
|
|
||||||
export const s3Service: S3Service =
|
export const s3Service: S3Service =
|
||||||
storageBackend === 's3'
|
storageBackend === 's3'
|
||||||
@@ -464,4 +464,4 @@ export const s3Service: S3Service =
|
|||||||
process.env.S3_USE_SSL === 'true',
|
process.env.S3_USE_SSL === 'true',
|
||||||
process.env.S3_REGION || 'auto',
|
process.env.S3_REGION || 'auto',
|
||||||
)
|
)
|
||||||
: new LocalStorageService(`${s3Endpoint}:${port}`)
|
: new LocalStorageService(s3Endpoint)
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export class VersionStackService {
|
|||||||
throw new Error('parent not found')
|
throw new Error('parent not found')
|
||||||
}
|
}
|
||||||
|
|
||||||
const firstFile = files[0]
|
const firstFile = files.find((f) => f.id === fileIds[0])
|
||||||
const sortIndex = firstFile?.sortIndex || null
|
const sortIndex = firstFile?.sortIndex || null
|
||||||
|
|
||||||
const stack = await tx.asset.create({
|
const stack = await tx.asset.create({
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/db",
|
"name": "@shumai/db",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/dtos",
|
"name": "@shumai/dtos",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/tableprinter",
|
"name": "@shumai/tableprinter",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/transcode",
|
"name": "@shumai/transcode",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/webui",
|
"name": "@shumai/webui",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./index.html",
|
"main": "./index.html",
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
export const APP_VERSION = '0.1.0'
|
export const APP_VERSION = '0.1.2'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@shumai/workflow-core",
|
"name": "@shumai/workflow-core",
|
||||||
"version": "0.1.0",
|
"version": "0.1.2",
|
||||||
"private": true,
|
"private": true,
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"main": "./src/index.ts",
|
"main": "./src/index.ts",
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
if [ "$(id -u)" = "0" ]; then
|
||||||
|
# Check if /app/data exists and is not owned by the bun user (UID 1000)
|
||||||
|
if [ -d "/app/data" ]; then
|
||||||
|
if [ "$(stat -c '%u' /app/data)" != "1000" ]; then
|
||||||
|
echo "Correcting permissions on /app/data..."
|
||||||
|
chown -R bun:bun /app/data
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Run the CMD as the bun user
|
||||||
|
exec gosu bun "$@"
|
||||||
|
else
|
||||||
|
# Run the CMD directly if already running as non-root
|
||||||
|
exec "$@"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user