add ui docker build
This commit is contained in:
@ -6,6 +6,15 @@ services:
|
|||||||
command: --host 0.0.0.0
|
command: --host 0.0.0.0
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
|
||||||
|
frontend:
|
||||||
|
build: ./ui
|
||||||
|
ports:
|
||||||
|
- "3000:3000"
|
||||||
|
command: --host 0.0.0.0
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:17-alpine
|
image: postgres:17-alpine
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
24
ui/.dockerignore
Normal file
24
ui/.dockerignore
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# Nuxt dev/build outputs
|
||||||
|
.output
|
||||||
|
.data
|
||||||
|
.nuxt
|
||||||
|
.nitro
|
||||||
|
.cache
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Node dependencies
|
||||||
|
node_modules
|
||||||
|
|
||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
|
||||||
|
# Misc
|
||||||
|
.DS_Store
|
||||||
|
.fleet
|
||||||
|
.idea
|
||||||
|
|
||||||
|
# Local env files
|
||||||
|
.env
|
||||||
|
.env.*
|
||||||
|
!.env.example
|
||||||
15
ui/Dockerfile
Normal file
15
ui/Dockerfile
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
FROM node:24-alpine AS base
|
||||||
|
|
||||||
|
FROM base AS build
|
||||||
|
WORKDIR /app
|
||||||
|
COPY package.json package-lock.json ./
|
||||||
|
RUN npm ci
|
||||||
|
COPY . .
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
FROM base AS prod
|
||||||
|
WORKDIR /app
|
||||||
|
COPY --from=build /app/.output ./ui
|
||||||
|
ENV PORT=3000
|
||||||
|
|
||||||
|
ENTRYPOINT [ "node", "/app/ui/server/index.mjs" ]
|
||||||
@ -2,5 +2,8 @@
|
|||||||
export default defineNuxtConfig({
|
export default defineNuxtConfig({
|
||||||
compatibilityDate: '2025-07-15',
|
compatibilityDate: '2025-07-15',
|
||||||
devtools: { enabled: true },
|
devtools: { enabled: true },
|
||||||
modules: ['@nuxt/eslint', '@nuxt/icon', '@nuxt/test-utils']
|
modules: ['@nuxt/eslint', '@nuxt/icon', '@nuxt/test-utils'],
|
||||||
|
nitro: {
|
||||||
|
preset: 'node-server'
|
||||||
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user