This commit is contained in:
parent
62de77e421
commit
940d590249
|
@ -0,0 +1 @@
|
||||||
|
node_modules
|
11
Dockerfile
11
Dockerfile
|
@ -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
|
10
package.json
10
package.json
|
@ -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"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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,
|
|
||||||
},
|
|
||||||
})
|
})
|
Loading…
Reference in New Issue