Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: import lib and code format #738

Merged
merged 10 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from 7 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
6 changes: 3 additions & 3 deletions docker/mono-ui-dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ WORKDIR /app
# RUN npm config set registry https://registry.npmmirror.com

# Install dependencies based on the preferred package manager
COPY ./moon/package*.json ./
RUN npm install -f
COPY ./moon/package*.json ./moon/pnpm-lock.yaml* ./

RUN corepack enable pnpm && pnpm i --frozen-lockfile

# Rebuild the source code only when needed
FROM base AS builder
Expand All @@ -26,7 +26,7 @@ COPY ./moon .
# Uncomment the following line in case you want to disable telemetry during the build.
ENV NEXT_TELEMETRY_DISABLED=1

RUN npm run build
RUN corepack enable pnpm && pnpm run build

# Production image, copy all the files and run next
FROM base AS runner
Expand Down
4 changes: 4 additions & 0 deletions moon/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.dockerignore
node_modules
npm-debug.log
.next
3 changes: 1 addition & 2 deletions moon/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,4 @@ yarn-error.log*
*.tsbuildinfo
next-env.d.ts

package-lock.json
pnpm-lock.yaml
package-lock.json
4 changes: 4 additions & 0 deletions moon/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
shamefully-hoist=true
strict-peer-dependencies=false
shell-emulator=true
auto-install-peers=true
10 changes: 9 additions & 1 deletion moon/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,12 @@ In the root directory of your project, three environment variables are required
### Environment Handling

- **Development Mode**: Next.js automatically reads the environment variables from the `.env` file.
- **Production Mode**: Environment variables must be passed via Docker commands when deploying the application.
- **Production Mode**: Environment variables must be passed via Docker commands when deploying the application.

### Development Commands

```bash
pnpm i

pnpm run dev
```
3 changes: 3 additions & 0 deletions moon/next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

const nextConfig = {
output: "standalone",
compiler: {
removeConsole: process.env.NODE_ENV === "production",
},
images: {
remotePatterns: [
{
Expand Down
4 changes: 3 additions & 1 deletion moon/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"@heroicons/react": "^2.2.0",
"@lexical/react": "^0.21.0",
"@tailwindcss/forms": "^0.5.9",
"antd": "^5.22.4",
"clsx": "^2.1.1",
"copy-to-clipboard": "^3.3.3",
"date-fns": "^4.1.0",
Expand All @@ -28,7 +29,8 @@
"prism-react-renderer": "^2.4.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-markdown": "^9.0.1"
"react-markdown": "^9.0.1",
"zustand": "4.5.5"
},
"devDependencies": {
"@types/node": "^22.10.1",
Expand Down
Loading
Loading