diff --git a/frontend/.docker/Dockerfile b/frontend/.docker/Dockerfile index aa0065f..6d7aeb2 100644 --- a/frontend/.docker/Dockerfile +++ b/frontend/.docker/Dockerfile @@ -1,16 +1,15 @@ FROM oven/bun:latest AS build - WORKDIR /app ENV NODE_ENV=production + COPY .. . RUN bun install --prod +RUN bun run build -FROM oven/bun:latest AS production - +FROM oven/bun:latest AS prod WORKDIR /app -RUN bun install --prod +COPY --from=build /app /app -EXPOSE 3001 -CMD ["bun", "start", "-p", "3001"] +CMD ["bun", "run", "start"] diff --git a/frontend/.dockerignore b/frontend/.dockerignore new file mode 100644 index 0000000..97e8899 --- /dev/null +++ b/frontend/.dockerignore @@ -0,0 +1,5 @@ +.angular +node_modules +dist +.git +.docker diff --git a/frontend/package.json b/frontend/package.json index 962c3f0..0e1c9e8 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -4,7 +4,7 @@ "scripts": { "ng": "bunx @angular/cli", "start": "bunx @angular/cli serve --proxy-config src/proxy.conf.json", - "build": "bunx @angular/cli build", + "build": "bunx @angular/cli build --no-watch", "watch": "bunx @angular/cli build --watch --configuration development", "test": "bunx @angular/cli test", "format": "prettier --write \"src/**/*.{ts,html,css,scss}\"",