FINALLY have the container run again locally
This commit is contained in:
parent
04b55e02fb
commit
af7b59797c
7 changed files with 64 additions and 20 deletions
17
.dockerignore
Normal file
17
.dockerignore
Normal file
|
@ -0,0 +1,17 @@
|
|||
# Hidden files
|
||||
.coverage
|
||||
.github
|
||||
.git
|
||||
.gitignore
|
||||
.vscode
|
||||
|
||||
# Folders
|
||||
examples
|
||||
node_modules
|
||||
infrastructure
|
||||
docs
|
||||
|
||||
# Files
|
||||
GitVersion.yml
|
||||
README.md
|
||||
renovate.json
|
22
Dockerfile
22
Dockerfile
|
@ -1,14 +1,14 @@
|
|||
FROM docker.io/denoland/deno:latest AS base
|
||||
FROM docker.io/imbios/bun-node:latest-23-alpine AS base
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
FROM base AS install
|
||||
RUN mkdir -p /temp/dev
|
||||
COPY package.json deno.lock /temp/dev
|
||||
RUN cd /temp/dev && deno install --frozen
|
||||
COPY package.json bun.lock /temp/dev
|
||||
RUN cd /temp/dev && bun install --frozen-lockfile
|
||||
|
||||
RUN mkdir -p /temp/prod
|
||||
COPY package.json deno.lock /temp/prod/
|
||||
RUN cd /temp/prod && deno install --frozen
|
||||
COPY package.json bun.lock /temp/prod/
|
||||
RUN cd /temp/prod && bun install --frozen-lockfile --production
|
||||
|
||||
FROM base AS prerelease
|
||||
COPY --from=install /temp/dev/node_modules node_modules
|
||||
|
@ -16,19 +16,19 @@ COPY . .
|
|||
RUN echo "SESSION_SECRET=$(head -c 64 /dev/random | base64)" > .env
|
||||
|
||||
ENV NODE_ENV=production
|
||||
ENV SERVER_PRESET=deno
|
||||
RUN deno run test
|
||||
ENV SERVER_PRESET=bun
|
||||
RUN chmod +x node_modules/.bin/*
|
||||
RUN deno run build
|
||||
RUN bun run test:ci
|
||||
RUN bun --bun run build
|
||||
|
||||
FROM base AS release
|
||||
COPY --from=install /temp/prod/node_modules node_modules
|
||||
COPY --from=prerelease /usr/src/app/.env .
|
||||
COPY --from=prerelease /usr/src/app/deno.lock .
|
||||
COPY --from=prerelease /usr/src/app/bun.lock .
|
||||
COPY --from=prerelease /usr/src/app/package.json .
|
||||
COPY --from=prerelease /usr/src/app/.vinxi .vinxi
|
||||
COPY --from=prerelease /usr/src/app/.output .output
|
||||
|
||||
USER deno
|
||||
USER bun
|
||||
EXPOSE 3000
|
||||
ENTRYPOINT [ "deno", "run", "start" ]
|
||||
ENTRYPOINT [ "bun", "--bun", "run", "start" ]
|
5
bun.lock
5
bun.lock
|
@ -45,6 +45,7 @@
|
|||
"bun-types": "^1.2.2",
|
||||
"jsdom": "^26.0.0",
|
||||
"solid-devtools": "^0.33.0",
|
||||
"vite-plugin-solid": "^2.11.2",
|
||||
"vite-plugin-solid-svg": "^0.8.1",
|
||||
"vitest": "^3.0.6",
|
||||
"workbox-window": "^7.3.0",
|
||||
|
@ -1436,7 +1437,7 @@
|
|||
|
||||
"vite-node": ["vite-node@3.0.6", "", { "dependencies": { "cac": "^6.7.14", "debug": "^4.4.0", "es-module-lexer": "^1.6.0", "pathe": "^2.0.3", "vite": "^5.0.0 || ^6.0.0" }, "bin": { "vite-node": "vite-node.mjs" } }, "sha512-s51RzrTkXKJrhNbUzQRsarjmAae7VmMPAsRT7lppVpIg6mK3zGthP9Hgz0YQQKuNcF+Ii7DfYk3Fxz40jRmePw=="],
|
||||
|
||||
"vite-plugin-solid": ["vite-plugin-solid@2.11.1", "", { "dependencies": { "@babel/core": "^7.23.3", "@types/babel__core": "^7.20.4", "babel-preset-solid": "^1.8.4", "merge-anything": "^5.1.7", "solid-refresh": "^0.6.3", "vitefu": "^1.0.4" }, "peerDependencies": { "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.*", "solid-js": "^1.7.2", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "optionalPeers": ["@testing-library/jest-dom"] }, "sha512-X9vbbK6AOOA6yxSsNl1VTuUq5y4BG9AR6Z5F/J1ZC2VO7ll8DlSCbOL+RcZXlRbxn0ptE6OI5832nGQhq4yXKQ=="],
|
||||
"vite-plugin-solid": ["vite-plugin-solid@2.11.2", "", { "dependencies": { "@babel/core": "^7.23.3", "@types/babel__core": "^7.20.4", "babel-preset-solid": "^1.8.4", "merge-anything": "^5.1.7", "solid-refresh": "^0.6.3", "vitefu": "^1.0.4" }, "peerDependencies": { "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.*", "solid-js": "^1.7.2", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "optionalPeers": ["@testing-library/jest-dom"] }, "sha512-/OXVasW5OIRSFXnqzMgm8X3hPvf+JTbGecjQhmk7QnbDFq4hqdLssuYAWw9GsJGfzUPiMHM3ME2Y2XHPsTWmkw=="],
|
||||
|
||||
"vite-plugin-solid-svg": ["vite-plugin-solid-svg@0.8.1", "", { "dependencies": { "svgo": "^3.1.0" }, "peerDependencies": { "solid-js": "^1", "vite": ">=4" } }, "sha512-ROGC2ae1eYUCMd+zfJtsbUtuZwsb6DZS0+Sy5/ZXDokOunGi0Ez/cL7OPdsixN3I0/rNYd/3hilo3kpRMAS+IA=="],
|
||||
|
||||
|
@ -1520,6 +1521,8 @@
|
|||
|
||||
"@solid-primitives/resize-observer/@solid-primitives/static-store": ["@solid-primitives/static-store@0.1.0", "", { "dependencies": { "@solid-primitives/utils": "^6.3.0" }, "peerDependencies": { "solid-js": "^1.6.12" } }, "sha512-6Coau0Kv/dF83UQpbBzc+gnJafOQAPe2jCbB4jmTK5UocsR5cWmFBVRm3kin+nZFVaO4WkuELw0cKANWgTVh8Q=="],
|
||||
|
||||
"@solidjs/start/vite-plugin-solid": ["vite-plugin-solid@2.11.1", "", { "dependencies": { "@babel/core": "^7.23.3", "@types/babel__core": "^7.20.4", "babel-preset-solid": "^1.8.4", "merge-anything": "^5.1.7", "solid-refresh": "^0.6.3", "vitefu": "^1.0.4" }, "peerDependencies": { "@testing-library/jest-dom": "^5.16.6 || ^5.17.0 || ^6.*", "solid-js": "^1.7.2", "vite": "^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0" }, "optionalPeers": ["@testing-library/jest-dom"] }, "sha512-X9vbbK6AOOA6yxSsNl1VTuUq5y4BG9AR6Z5F/J1ZC2VO7ll8DlSCbOL+RcZXlRbxn0ptE6OI5832nGQhq4yXKQ=="],
|
||||
|
||||
"@testing-library/dom/aria-query": ["aria-query@5.3.0", "", { "dependencies": { "dequal": "^2.0.3" } }, "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A=="],
|
||||
|
||||
"@testing-library/dom/chalk": ["chalk@4.1.2", "", { "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" } }, "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA=="],
|
||||
|
|
18
deno.lock
generated
18
deno.lock
generated
|
@ -41,6 +41,7 @@
|
|||
"npm:unist-util-visit@5": "5.0.0",
|
||||
"npm:vinxi@~0.5.3": "0.5.3_@babel+core@7.26.9",
|
||||
"npm:vite-plugin-solid-svg@~0.8.1": "0.8.1_solid-js@1.9.4__seroval@1.2.1_vite@6.1.0",
|
||||
"npm:vite-plugin-solid@^2.11.2": "2.11.2_@testing-library+jest-dom@6.6.3_solid-js@1.9.4__seroval@1.2.1_vite@6.1.0_@babel+core@7.26.9",
|
||||
"npm:vitest@^3.0.6": "3.0.6_jsdom@26.0.0_vite@6.1.0",
|
||||
"npm:workbox-window@^7.3.0": "7.3.0"
|
||||
},
|
||||
|
@ -1017,7 +1018,7 @@
|
|||
"terracotta",
|
||||
"tinyglobby",
|
||||
"vinxi",
|
||||
"vite-plugin-solid"
|
||||
"vite-plugin-solid@2.11.1_@testing-library+jest-dom@6.6.3_solid-js@1.9.4__seroval@1.2.1_vite@6.1.0_@babel+core@7.26.9"
|
||||
]
|
||||
},
|
||||
"@solidjs/testing-library@0.8.10_@solidjs+router@0.15.3__solid-js@1.9.4___seroval@1.2.1_solid-js@1.9.4__seroval@1.2.1": {
|
||||
|
@ -4573,6 +4574,20 @@
|
|||
"vitefu"
|
||||
]
|
||||
},
|
||||
"vite-plugin-solid@2.11.2_@testing-library+jest-dom@6.6.3_solid-js@1.9.4__seroval@1.2.1_vite@6.1.0_@babel+core@7.26.9": {
|
||||
"integrity": "sha512-/OXVasW5OIRSFXnqzMgm8X3hPvf+JTbGecjQhmk7QnbDFq4hqdLssuYAWw9GsJGfzUPiMHM3ME2Y2XHPsTWmkw==",
|
||||
"dependencies": [
|
||||
"@babel/core",
|
||||
"@testing-library/jest-dom",
|
||||
"@types/babel__core",
|
||||
"babel-preset-solid",
|
||||
"merge-anything",
|
||||
"solid-js",
|
||||
"solid-refresh",
|
||||
"vite",
|
||||
"vitefu"
|
||||
]
|
||||
},
|
||||
"vite@6.1.0": {
|
||||
"integrity": "sha512-RjjMipCKVoR4hVfPY6GQTgveinjNuyLw+qruksLDvA5ktI1150VmcMBKmQaEWJhg/j6Uaf6dNCNA0AfdzUb/hQ==",
|
||||
"dependencies": [
|
||||
|
@ -4809,6 +4824,7 @@
|
|||
"npm:unist-util-visit@5",
|
||||
"npm:vinxi@~0.5.3",
|
||||
"npm:vite-plugin-solid-svg@~0.8.1",
|
||||
"npm:vite-plugin-solid@^2.11.2",
|
||||
"npm:vitest@^3.0.6",
|
||||
"npm:workbox-window@^7.3.0"
|
||||
]
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
"bun-types": "^1.2.2",
|
||||
"jsdom": "^26.0.0",
|
||||
"solid-devtools": "^0.33.0",
|
||||
"vite-plugin-solid": "^2.11.2",
|
||||
"vite-plugin-solid-svg": "^0.8.1",
|
||||
"vitest": "^3.0.6",
|
||||
"workbox-window": "^7.3.0"
|
||||
|
@ -56,7 +57,7 @@
|
|||
"build": "vinxi build",
|
||||
"start": "vinxi start",
|
||||
"version": "vinxi version",
|
||||
"test": "vitest",
|
||||
"test:coverage": "vitest --coverage"
|
||||
"test": "vitest --coverage",
|
||||
"test:ci": "vitest run"
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@
|
|||
"title": "Hi, welcome!",
|
||||
"subtitle": "Lets get started",
|
||||
"edit": "Start editing",
|
||||
"instructions": "Read the instructions",
|
||||
"instructions": "Read the **instructions**",
|
||||
"about": "Abut this app"
|
||||
},
|
||||
"edit": {
|
||||
|
@ -51,4 +51,4 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import { defineConfig } from 'vitest/config';
|
||||
import solidPlugin from 'vite-plugin-solid';
|
||||
import { resolve } from 'path'
|
||||
import type { Plugin } from 'vite';
|
||||
import { resolve } from 'node:path'
|
||||
import { CoverageReporter, CoverageV8Options } from 'vitest/node';
|
||||
import type { Plugin } from 'vite';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
solidPlugin(),
|
||||
reportWith('lcov', 'text')
|
||||
reportWith('lcov', 'text'),
|
||||
],
|
||||
resolve: {
|
||||
conditions: ['development', 'browser'],
|
||||
|
@ -17,6 +17,13 @@ export default defineConfig({
|
|||
},
|
||||
test: {
|
||||
environment: 'jsdom',
|
||||
deps: {
|
||||
optimizer: {
|
||||
web: {
|
||||
enabled: true,
|
||||
}
|
||||
}
|
||||
},
|
||||
coverage: {
|
||||
provider: 'istanbul',
|
||||
reportsDirectory: './.coverage',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue