Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,16 @@ tmp/
.project
.DS_Store
bower_components/
node_modules/
node_modules/

# Next.js
.next/
out/
.env.local
.env*.local

# Migration artifacts
.env
analysis-report.json
migration-plan.json
graphify-out/
37 changes: 31 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,33 @@
FROM node:14
ENV COOLSTORE_GW_ENDPOINT=http://localhost:8090
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
FROM node:18-alpine AS base

FROM base AS deps
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci

FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
ENV NEXT_TELEMETRY_DISABLED=1
RUN npm run build

FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV COOLSTORE_GW_ENDPOINT=http://localhost:8090

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER 1001
EXPOSE 8080
CMD [ "npm", "start" ]
ENV PORT=8080
ENV HOSTNAME="0.0.0.0"

CMD ["node", "server.js"]
39 changes: 31 additions & 8 deletions Dockerfile.ci
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
FROM node:14
ENV COOLSTORE_GW_ENDPOINT=http://gateway-vertx:8080
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm ci --only=production
RUN npm install
FROM node:18-alpine AS base

FROM base AS deps
WORKDIR /app
COPY package.json package-lock.json* ./
RUN npm ci

FROM base AS builder
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN chmod -R a+rw /usr/src/app
ENV NEXT_TELEMETRY_DISABLED=1
ENV COOLSTORE_GW_ENDPOINT=http://gateway-vertx:8080
RUN npm run build

FROM base AS runner
WORKDIR /app
ENV NODE_ENV=production
ENV NEXT_TELEMETRY_DISABLED=1
ENV COOLSTORE_GW_ENDPOINT=http://gateway-vertx:8080

RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

COPY --from=builder /app/public ./public
COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./
COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static

USER 1001
EXPOSE 8080
CMD [ "npm", "start" ]
ENV PORT=8080
ENV HOSTNAME="0.0.0.0"

CMD ["node", "server.js"]
106 changes: 0 additions & 106 deletions app/app.js

This file was deleted.

79 changes: 0 additions & 79 deletions app/controllers/controllers.js

This file was deleted.

2 changes: 0 additions & 2 deletions app/coolstore.config.js

This file was deleted.

13 changes: 0 additions & 13 deletions app/css/coolstore.css

This file was deleted.

11 changes: 0 additions & 11 deletions app/directives/header.js

This file was deleted.

10 changes: 0 additions & 10 deletions app/routes/routes.js

This file was deleted.

33 changes: 0 additions & 33 deletions app/services/catalog.js

This file was deleted.

Loading