Initial version #1

Merged
Thilawyn merged 25 commits from base-project into master 2025-09-18 01:26:10 +02:00
8 changed files with 30 additions and 37 deletions
Showing only changes of commit f355a14fcf - Show all commits

View File

@@ -1,24 +1,15 @@
FROM oven/bun:1 AS bun FROM oven/bun:1.2.22 AS bun
FROM node:22.19.0-trixie-slim
FROM node:20-trixie-slim
COPY --from=bun /usr/local/bin/bun \ COPY --from=bun /usr/local/bin/bun \
/usr/local/bin/bunx \ /usr/local/bin/bunx \
/usr/local/bin/ /usr/local/bin/
WORKDIR /app WORKDIR /app
COPY ./ ./ COPY ./ ./
RUN bun install --frozen-lockfile && \ RUN bun install --frozen-lockfile && \
npm run build && \ bun lint:tsc && \
npm run lint:tsc && \ bun --cwd=./packages/server bun:build && \
# npm run lint:eslint && \ bun --cwd=./packages/server node:build && \
npm run clean:cache && \ bun --cwd=./packages/webapp build && \
\ bun clean:cache && \
npm run clean:node && \ bun clean:node && \
bun install --frozen-lockfile --production && \ 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

View File

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

View File

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

View File

@@ -4,7 +4,10 @@
"private": true, "private": true,
"workspaces": ["./packages/*"], "workspaces": ["./packages/*"],
"scripts": { "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": { "devDependencies": {
"@effect/language-service": "^0.40.0", "@effect/language-service": "^0.40.0",

View File

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

View File

@@ -3,9 +3,15 @@
"private": true, "private": true,
"type": "module", "type": "module",
"scripts": { "scripts": {
"lint:tsc": "tsc --noEmit",
"bun:dev": "NODE_ENV=development bun --hot ./src/entrypoint.bun.ts", "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", "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": { "dependencies": {
"@effect/opentelemetry": "^0.56.6", "@effect/opentelemetry": "^0.56.6",
@@ -22,6 +28,7 @@
"effect": "^3.17.13" "effect": "^3.17.13"
}, },
"devDependencies": { "devDependencies": {
"esbuild": "^0.25.9",
"tsx": "^4.20.5" "tsx": "^4.20.5"
} }
} }

View File

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

View File

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