Skip to content

Commit

Permalink
modify Docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
aeworxet committed Jun 21, 2024
1 parent a07f335 commit c0f4083
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 70 deletions.
6 changes: 2 additions & 4 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
.git/
.github/
node_modules/
build/
Dockerfile
.dockerignore
23 changes: 23 additions & 0 deletions StudioNextDockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM node:18-alpine AS base

# Install dependencies only when needed
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed.
RUN apk add --no-cache libc6-compat
WORKDIR /app

COPY . .

ENV NODE_ENV production

# Next.js collects completely anonymous telemetry data about general usage.
# Learn more here: https://nextjs.org/telemetry
# Uncomment the following line in case you want to disable telemetry during runtime.
ENV NEXT_TELEMETRY_DISABLED 1

EXPOSE 3001

ENV PORT 3001

# server.js is created by next build from the standalone output
# https://nextjs.org/docs/pages/api-reference/next-config-js/output
CMD HOSTNAME="0.0.0.0" node apps/studio-next/server.js
7 changes: 0 additions & 7 deletions apps/studio-next/.dockerignore

This file was deleted.

58 changes: 0 additions & 58 deletions apps/studio-next/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions apps/studio-next/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"build": "next build",
"start": "next start",
"lint": "next lint",
"build:studio-next:docker": "next build && cp -r public .next/standalone/apps/studio-next/public && cp -r .next/static .next/standalone/apps/studio-next/.next && cp ../../StudioNextDockerfile .next/standalone/Dockerfile && cp ../../.dockerignore .next/standalone/.dockerignore && cd .next/standalone && docker build -t asyncapi/studio:latest .",
"docker:build": "docker build -t asyncapi/studio:latest .",
"cy:e2e:chrome": "cypress run --e2e --browser chrome",
"cy:e2e:chromium": "cypress run --e2e --browser chromium",
Expand Down
5 changes: 4 additions & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
},
"clean": {},
"lint": {},
"generate:assets":{}
"generate:assets":{},
"build:studio-next:docker": {
"dependsOn": ["^build:studio-next:docker"]
}
}
}

0 comments on commit c0f4083

Please sign in to comment.