diff --git a/docker-compose.yml b/docker-compose.yml index 58aaed5..3bce027 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/ui/.dockerignore b/ui/.dockerignore new file mode 100644 index 0000000..4a7f73a --- /dev/null +++ b/ui/.dockerignore @@ -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 diff --git a/ui/Dockerfile b/ui/Dockerfile new file mode 100644 index 0000000..8787276 --- /dev/null +++ b/ui/Dockerfile @@ -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" ] diff --git a/ui/nuxt.config.ts b/ui/nuxt.config.ts index d59bc10..2ebf692 100644 --- a/ui/nuxt.config.ts +++ b/ui/nuxt.config.ts @@ -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' + } })