Dockerfile
Some checks failed
Lint / lint (push) Successful in 13s
Build / build (pull_request) Failing after 31s

This commit is contained in:
Julien Valverdé
2025-09-18 00:10:31 +02:00
parent 0908eba0ad
commit f355a14fcf
8 changed files with 30 additions and 37 deletions

View File

@@ -1,24 +1,15 @@
FROM oven/bun:1 AS bun
FROM node:20-trixie-slim
FROM oven/bun:1.2.22 AS bun
FROM node:22.19.0-trixie-slim
COPY --from=bun /usr/local/bin/bun \
/usr/local/bin/bunx \
/usr/local/bin/
WORKDIR /app
COPY ./ ./
RUN bun install --frozen-lockfile && \
npm run build && \
npm run lint:tsc && \
# npm run lint:eslint && \
npm run clean:cache && \
\
npm run clean:node && \
bun install --frozen-lockfile --production && \
find node_modules/proxy-from-env -type f -exec chmod 644 {} \; && \
npx -w packages/server prisma generate && \
\
cd cms && \
bun install --frozen-lockfile --production && \
npm run build
bun lint:tsc && \
bun --cwd=./packages/server bun:build && \
bun --cwd=./packages/server node:build && \
bun --cwd=./packages/webapp build && \
bun clean:cache && \
bun clean:node && \
bun install --frozen-lockfile --production

View File

@@ -36,6 +36,7 @@
"effect": "^3.17.13",
},
"devDependencies": {
"esbuild": "^0.25.9",
"tsx": "^4.20.5",
},
},

View File

@@ -11,7 +11,7 @@ x-env-base: &env-base
services:
server:
<<: *service-base
image: node:20
image: node:22.19.0
volumes:
- *volume-app
working_dir: /app/packages/server
@@ -22,7 +22,7 @@ services:
cli:
<<: *service-base
image: oven/bun:latest
image: oven/bun:1.2.22
volumes:
- *volume-app
working_dir: /app
@@ -35,7 +35,7 @@ services:
webapp:
<<: *service-base
image: node:20
image: node:22.19.0
ports:
- ${PORT:?PORT missing}:80
volumes:

View File

@@ -4,7 +4,10 @@
"private": true,
"workspaces": ["./packages/*"],
"scripts": {
"lint:tsc": "turbo lint:tsc"
"lint:tsc": "turbo lint:tsc",
"clean:cache": "turbo clean:cache && rm -rf .turbo",
"clean:dist": "turbo clean:dist && rm -rf dist",
"clean:node": "turbo clean:node && rm -rf node_modules"
},
"devDependencies": {
"@effect/language-service": "^0.40.0",

View File

@@ -8,7 +8,8 @@
"./*": "./src/*.ts"
},
"scripts": {
"lint:tsc": "tsc --noEmit"
"lint:tsc": "tsc --noEmit",
"clean:node": "rm -rf node_modules"
},
"dependencies": {
"@effect/rpc": "^0.69.2",

View File

@@ -3,9 +3,15 @@
"private": true,
"type": "module",
"scripts": {
"lint:tsc": "tsc --noEmit",
"bun:dev": "NODE_ENV=development bun --hot ./src/entrypoint.bun.ts",
"bun:build": "esbuild ./src/entrypoint.bun.ts --outdir=./dist --bundle --minify --format=esm --sourcemap --platform=node",
"bun:start": "NODE_ENV=production bun ./dist/entrypoint.bun.js",
"node:dev": "NODE_ENV=development tsx --watch ./src/entrypoint.node.ts",
"lint:tsc": "tsc --noEmit"
"node:build": "esbuild ./src/entrypoint.node.ts --outdir=./dist --bundle --minify --format=esm --sourcemap --platform=node",
"node:start": "NODE_ENV=production node ./dist/entrypoint.node.js",
"clean:dist": "rm -rf dist",
"clean:node": "rm -rf node_modules"
},
"dependencies": {
"@effect/opentelemetry": "^0.56.6",
@@ -22,6 +28,7 @@
"effect": "^3.17.13"
},
"devDependencies": {
"esbuild": "^0.25.9",
"tsx": "^4.20.5"
}
}

View File

@@ -8,7 +8,9 @@
"build": "tsc -b && vite build",
"lint": "eslint .",
"lint:tsc": "tsc --noEmit",
"preview": "vite preview"
"preview": "vite preview",
"clean:dist": "rm -rf dist",
"clean:node": "rm -rf node_modules"
},
"dependencies": {
"@effect/platform": "^0.90.9",

View File

@@ -2,24 +2,12 @@
"$schema": "https://turbo.build/schema.json",
"tasks": {
"build": {
"dependsOn": ["^build"],
"inputs": ["src/**"],
"outputs": ["dist/**"],
"cache": false
},
"lint:tsc": {
"cache": false
},
"lint:eslint": {
"cache": false
},
"clean:cache": {
"dependsOn": ["^clean:cache"],
"cache": false
},
"clean:dist": {
"dependsOn": ["^clean:dist"],
"cache": false