This commit is contained in:
Alie 2024-04-21 10:47:31 +02:00
parent 62de77e421
commit 940d590249
6 changed files with 2039 additions and 17 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
node_modules

View File

@ -1,14 +1,9 @@
FROM oven/bun:1 as base FROM oven/bun:1 as install
FROM base as install
RUN mkdir -p /temp/prod RUN mkdir -p /temp/prod
COPY package.json bun.lockb /temp/prod/ COPY package.json bun.lockb /temp/prod/
RUN cd /temp/prod && bun install --production --frozen-lockfile RUN cd /temp/prod && bun install --frozen-lockfile
FROM base as build
RUN mkdir -p /temp/prod
COPY . /temp/prod/ COPY . /temp/prod/
RUN cd /temp/prod && bun run build RUN cd /temp/prod && bun run build
FROM nginx AS release FROM nginx AS release
COPY --from=build /temp/prod/dist /usr/share/nginx/html COPY --from=install /temp/prod/dist /usr/share/nginx/html

BIN
bun.lockb

Binary file not shown.

View File

@ -5,12 +5,14 @@
"type": "module", "type": "module",
"scripts": { "scripts": {
"dev": "docker compose down -v && docker compose watch", "dev": "docker compose down -v && docker compose watch",
"build": "tsc && vite build", "build": "bunx --bun tsc && bunx --bun vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0" "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
}, },
"dependencies": { "dependencies": {
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0",
"typescript": "^5.2.2",
"vite": "^5.0.8"
}, },
"devDependencies": { "devDependencies": {
"@happy-dom/global-registrator": "^13.6.2", "@happy-dom/global-registrator": "^13.6.2",
@ -24,8 +26,6 @@
"bun-types": "^1.0.29", "bun-types": "^1.0.29",
"eslint": "^8.55.0", "eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5", "eslint-plugin-react-refresh": "^0.4.5"
"typescript": "^5.2.2",
"vite": "^5.0.8"
} }
} }

View File

@ -3,8 +3,5 @@ import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/ // https://vitejs.dev/config/
export default defineConfig({ export default defineConfig({
plugins: [react()], plugins: [react()]
server: {
port: 8081,
},
}) })

2029
yarn.lock Normal file

File diff suppressed because it is too large Load Diff