This commit is contained in:
@@ -12,8 +12,10 @@ jobs:
|
||||
steps:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Login to Container Registry
|
||||
if: ${{ gitea.event_name != 'pull_request' }}
|
||||
uses: docker/login-action@v3
|
||||
@@ -35,33 +37,12 @@ jobs:
|
||||
type=sha
|
||||
flavor: |
|
||||
latest=true
|
||||
- name: Generate legacy API Docker metadata
|
||||
id: meta-legacy-api
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: |
|
||||
docker.valverde.cloud/commelechef/legacy-api
|
||||
tags: |
|
||||
type=ref,event=branch
|
||||
type=ref,event=tag
|
||||
type=ref,event=pr
|
||||
type=sha
|
||||
flavor: |
|
||||
latest=true
|
||||
|
||||
- name: Build
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/website/Dockerfile
|
||||
file: ./Dockerfile
|
||||
push: ${{ gitea.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
- name: Build legacy API
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
file: ./docker/legacy-api/Dockerfile
|
||||
push: ${{ gitea.event_name != 'pull_request' }}
|
||||
tags: ${{ steps.meta-legacy-api.outputs.tags }}
|
||||
labels: ${{ steps.meta-legacy-api.outputs.labels }}
|
||||
|
||||
@@ -17,9 +17,5 @@ jobs:
|
||||
uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: bun install --frozen-lockfile
|
||||
- name: Lint TypeScript common
|
||||
run: npm -w packages/common run lint:tsc
|
||||
- name: Lint TypeScript server
|
||||
run: npm -w packages/server run lint:tsc
|
||||
- name: Lint TypeScript webapp
|
||||
run: npm -w packages/webapp run lint:tsc
|
||||
- name: Lint TypeScript
|
||||
run: npm run lint:tsc
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -32,3 +32,5 @@ report.[0-9]_.[0-9]_.[0-9]_.[0-9]_.json
|
||||
|
||||
# Finder (MacOS) folder config
|
||||
.DS_Store
|
||||
|
||||
.turbo
|
||||
|
||||
24
Dockerfile
Normal file
24
Dockerfile
Normal file
@@ -0,0 +1,24 @@
|
||||
FROM oven/bun:1 AS bun
|
||||
|
||||
FROM node:20-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
|
||||
15
bun.lock
15
bun.lock
@@ -8,6 +8,7 @@
|
||||
"@types/bun": "latest",
|
||||
"npm-check-updates": "^18.1.1",
|
||||
"npm-sort": "^0.0.4",
|
||||
"turbo": "^2.5.6",
|
||||
"typescript": "^5.9.2",
|
||||
},
|
||||
},
|
||||
@@ -656,6 +657,20 @@
|
||||
|
||||
"tsx": ["tsx@4.20.5", "", { "dependencies": { "esbuild": "~0.25.0", "get-tsconfig": "^4.7.5" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "bin": { "tsx": "dist/cli.mjs" } }, "sha512-+wKjMNU9w/EaQayHXb7WA7ZaHY6hN8WgfvHNQ3t1PnU91/7O8TcTnIhCDYTZwnt8JsO9IBqZ30Ln1r7pPF52Aw=="],
|
||||
|
||||
"turbo": ["turbo@2.5.6", "", { "optionalDependencies": { "turbo-darwin-64": "2.5.6", "turbo-darwin-arm64": "2.5.6", "turbo-linux-64": "2.5.6", "turbo-linux-arm64": "2.5.6", "turbo-windows-64": "2.5.6", "turbo-windows-arm64": "2.5.6" }, "bin": { "turbo": "bin/turbo" } }, "sha512-gxToHmi9oTBNB05UjUsrWf0OyN5ZXtD0apOarC1KIx232Vp3WimRNy3810QzeNSgyD5rsaIDXlxlbnOzlouo+w=="],
|
||||
|
||||
"turbo-darwin-64": ["turbo-darwin-64@2.5.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-3C1xEdo4aFwMJAPvtlPqz1Sw/+cddWIOmsalHFMrsqqydcptwBfu26WW2cDm3u93bUzMbBJ8k3zNKFqxJ9ei2A=="],
|
||||
|
||||
"turbo-darwin-arm64": ["turbo-darwin-arm64@2.5.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-LyiG+rD7JhMfYwLqB6k3LZQtYn8CQQUePbpA8mF/hMLPAekXdJo1g0bUPw8RZLwQXUIU/3BU7tXENvhSGz5DPA=="],
|
||||
|
||||
"turbo-linux-64": ["turbo-linux-64@2.5.6", "", { "os": "linux", "cpu": "x64" }, "sha512-GOcUTT0xiT/pSnHL4YD6Yr3HreUhU8pUcGqcI2ksIF9b2/r/kRHwGFcsHgpG3+vtZF/kwsP0MV8FTlTObxsYIA=="],
|
||||
|
||||
"turbo-linux-arm64": ["turbo-linux-arm64@2.5.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-10Tm15bruJEA3m0V7iZcnQBpObGBcOgUcO+sY7/2vk1bweW34LMhkWi8svjV9iDF68+KJDThnYDlYE/bc7/zzQ=="],
|
||||
|
||||
"turbo-windows-64": ["turbo-windows-64@2.5.6", "", { "os": "win32", "cpu": "x64" }, "sha512-FyRsVpgaj76It0ludwZsNN40ytHN+17E4PFJyeliBEbxrGTc5BexlXVpufB7XlAaoaZVxbS6KT8RofLfDRyEPg=="],
|
||||
|
||||
"turbo-windows-arm64": ["turbo-windows-arm64@2.5.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-j/tWu8cMeQ7HPpKri6jvKtyXg9K1gRyhdK4tKrrchH8GNHscPX/F71zax58yYtLRWTiK04zNzPcUJuoS0+v/+Q=="],
|
||||
|
||||
"type-check": ["type-check@0.4.0", "", { "dependencies": { "prelude-ls": "^1.2.1" } }, "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew=="],
|
||||
|
||||
"typescript": ["typescript@5.9.2", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-CWBzXQrc/qOkhidw1OzBTQuYRbfyxDXJMVJ1XNwUHGROVmuaeiEm3OslpZ1RV96d7SKKjZKrSJu3+t/xlw3R9A=="],
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
{
|
||||
"name": "website",
|
||||
"packageManager": "bun@1.2.22",
|
||||
"private": true,
|
||||
"workspaces": ["./packages/*"],
|
||||
"scripts": {
|
||||
"lint:tsc": "turbo lint:tsc"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@effect/language-service": "^0.40.0",
|
||||
"@types/bun": "latest",
|
||||
"npm-check-updates": "^18.1.1",
|
||||
"npm-sort": "^0.0.4",
|
||||
"turbo": "^2.5.6",
|
||||
"typescript": "^5.9.2"
|
||||
}
|
||||
}
|
||||
|
||||
32
turbo.json
Normal file
32
turbo.json
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"$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
|
||||
},
|
||||
"clean:node": {
|
||||
"dependsOn": ["^clean:node"],
|
||||
"cache": false
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user