add ui docker build
All checks were successful
Backend Actions / check (push) Successful in 28s
Backend Actions / build (push) Successful in 27s
Backend Actions / test (push) Successful in 35s

This commit is contained in:
2025-07-25 17:12:13 +01:00
parent e7eb9b8b16
commit 70835f04fa
4 changed files with 52 additions and 1 deletions

View File

@ -6,6 +6,15 @@ services:
command: --host 0.0.0.0
depends_on:
- db
frontend:
build: ./ui
ports:
- "3000:3000"
command: --host 0.0.0.0
depends_on:
- db
db:
image: postgres:17-alpine
environment:

24
ui/.dockerignore Normal file
View 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
View 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" ]

View File

@ -2,5 +2,8 @@
export default defineNuxtConfig({
compatibilityDate: '2025-07-15',
devtools: { enabled: true },
modules: ['@nuxt/eslint', '@nuxt/icon', '@nuxt/test-utils']
modules: ['@nuxt/eslint', '@nuxt/icon', '@nuxt/test-utils'],
nitro: {
preset: 'node-server'
}
})