mirror of
https://github.com/journey-ad/Bitmagnet-Next-Web
synced 2024-11-21 17:39:35 +00:00
🔨 Refactor for CI
This commit is contained in:
parent
3f99a9c9e4
commit
307476421a
12
Dockerfile
12
Dockerfile
@ -7,7 +7,8 @@ WORKDIR /app
|
||||
# Install dependencies
|
||||
FROM base AS deps
|
||||
COPY package.json ./
|
||||
RUN npm config set registry 'https://registry.npmmirror.com/' && npm install
|
||||
RUN npm config set registry 'https://registry.npmmirror.com/'
|
||||
RUN npm install
|
||||
|
||||
# Build the application
|
||||
FROM base AS builder
|
||||
@ -22,13 +23,14 @@ FROM node:18-alpine AS runner
|
||||
WORKDIR /app
|
||||
|
||||
# Copy the necessary files from the builder stage
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next ./.next
|
||||
COPY --from=builder /app/node_modules ./node_modules
|
||||
COPY --from=builder /app/package.json ./package.json
|
||||
COPY --from=builder /app/public ./public
|
||||
COPY --from=builder /app/.next/standalone ./
|
||||
COPY --from=builder /app/.next/static ./.next/static
|
||||
COPY --from=builder /app/.next/server ./.next/server
|
||||
|
||||
# Expose the application port
|
||||
EXPOSE 3000
|
||||
|
||||
# Start the application
|
||||
CMD ["npm", "start"]
|
||||
CMD ["node", "server.js"]
|
||||
|
@ -2,7 +2,12 @@ const createNextIntlPlugin = require('next-intl/plugin');
|
||||
|
||||
const withNextIntl = createNextIntlPlugin('./i18n');
|
||||
|
||||
const mode = process.env.BUILD_MODE ?? 'standalone';
|
||||
console.log("[Next] build mode:", mode);
|
||||
|
||||
/** @type {import('next').NextConfig} */
|
||||
const nextConfig = {}
|
||||
const nextConfig = {
|
||||
output: mode,
|
||||
}
|
||||
|
||||
module.exports = withNextIntl(nextConfig);
|
||||
|
38
package.json
38
package.json
@ -1,10 +1,9 @@
|
||||
{
|
||||
"name": "bitmagnet-next-web",
|
||||
"version": "0.0.1",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev": "next dev",
|
||||
"build": "next build",
|
||||
"build": "cross-env BUILD_MODE=standalone next build",
|
||||
"start": "next start",
|
||||
"lint": "eslint . --ext .ts,.tsx -c .eslintrc.json --fix"
|
||||
},
|
||||
@ -19,25 +18,9 @@
|
||||
"@react-aria/visually-hidden": "3.8.12",
|
||||
"@tsparticles/react": "^3.0.0",
|
||||
"@tsparticles/slim": "^3.4.0",
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "20.5.7",
|
||||
"@types/react": "18.3.2",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.10.0",
|
||||
"@typescript-eslint/parser": "^7.10.0",
|
||||
"autoprefixer": "10.4.19",
|
||||
"clsx": "2.1.1",
|
||||
"dayjs": "^1.11.11",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-next": "14.2.1",
|
||||
"eslint-config-prettier": "^8.2.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-react": "^7.23.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-unused-imports": "^3.2.0",
|
||||
"framer-motion": "~11.1.1",
|
||||
"graphql": "^16.8.1",
|
||||
"graphql-tag": "^2.12.6",
|
||||
@ -56,6 +39,23 @@
|
||||
"zod": "^3.23.8"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/pg": "^8.11.6"
|
||||
"@types/js-cookie": "^3.0.6",
|
||||
"@types/node": "20.5.7",
|
||||
"@types/pg": "^8.11.6",
|
||||
"@types/react": "18.3.2",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"@typescript-eslint/eslint-plugin": "^7.10.0",
|
||||
"@typescript-eslint/parser": "^7.10.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-next": "14.2.1",
|
||||
"eslint-config-prettier": "^8.2.0",
|
||||
"eslint-plugin-import": "^2.26.0",
|
||||
"eslint-plugin-jsx-a11y": "^6.4.1",
|
||||
"eslint-plugin-node": "^11.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-react": "^7.23.2",
|
||||
"eslint-plugin-react-hooks": "^4.6.0",
|
||||
"eslint-plugin-unused-imports": "^3.2.0"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user