diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..7cff210 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,7 @@ +node_modules +.next +out +docs +.git +.gitignore +npm-debug.log \ No newline at end of file diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml new file mode 100644 index 0000000..25babe4 --- /dev/null +++ b/.gitea/workflows/test.yml @@ -0,0 +1,34 @@ +name: Runner Test + +on: + push: + branches: [ main ] + workflow_dispatch: # lets you trigger it manually from the UI too + +jobs: + hello: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Print basic info + run: | + echo "✅ Runner is working!" + echo "Hostname: $(hostname)" + echo "Date: $(date)" + echo "User: $(whoami)" + pwd + ls -la + + - name: Test env variables + run: | + echo "Branch: ${{ github.ref_name }}" + echo "Commit SHA: ${{ github.sha }}" + echo "Actor: ${{ github.actor }}" + + - name: Simulate a build step + run: | + mkdir -p build + echo "Build artifact content" > build/output.txt + cat build/output.txt diff --git a/.idea/jsonSchemas.xml b/.idea/jsonSchemas.xml new file mode 100644 index 0000000..eb842ea --- /dev/null +++ b/.idea/jsonSchemas.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 98940e2..d8abaf5 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -5,12 +5,12 @@ + + + + - - - - - + - { - "keyToString": { - "ModuleVcsDetector.initialDetectionPerformed": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.TerminalTabsStorage.copyFrom.TerminalArrangementManager.252": "true", - "RunOnceActivity.git.unshallow": "true", - "RunOnceActivity.typescript.service.memoryLimit.init": "true", - "codeWithMe.voiceChat.enabledByDefault": "false", - "git-widget-placeholder": "main", - "javascript.nodejs.core.library.configured.version": "24.20.0", - "javascript.nodejs.core.library.typings.version": "24.13.3", - "javascript.preferred.runtime.type.id": "node", - "js.debugger.nextJs.config.created.client": "true", - "js.debugger.nextJs.config.created.server": "true", - "kronk.content.tree.expanded.paths": "", - "last_opened_file_path": "/home/hamed/Documents/Projects/GIthubRepo/robot-market-launcher-pwa", - "node.js.detected.package.eslint": "true", - "node.js.detected.package.tslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "node.js.selected.package.tslint": "(autodetect)", - "nodejs_package_manager_path": "npm", - "settings.editor.selected.configurable": "editor.preferences.fonts.default", - "ts.external.directory.path": "C:\\Program Files\\JetBrains\\WebStorm 2026.1.1\\plugins\\javascript-plugin\\jsLanguageServicesImpl\\external", - "vue.rearranger.settings.migration": "true" + +}]]> @@ -180,7 +181,11 @@ - + + + + + - diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..6f4f3fd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,29 @@ +FROM node:20-alpine AS builder + +WORKDIR /app + +COPY package*.json ./ + +RUN npm ci + +COPY . . + +RUN npm run build + + +FROM node:20-alpine AS runner + +WORKDIR /app + +ENV NODE_ENV=production +ENV HOSTNAME=0.0.0.0 + +COPY --from=builder /app/public ./public + +COPY --from=builder /app/.next/standalone ./ + +COPY --from=builder /app/.next/static ./.next/static + +EXPOSE 3000 + +CMD ["node", "server.js"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..7dd8e6f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +services: + robot-market: + build: + context: . + container_name: robot-market + ports: + - "3000:3000" + environment: + NODE_ENV: production + HOSTNAME: 0.0.0.0 + restart: unless-stopped \ No newline at end of file diff --git a/next.config.js b/next.config.js index a7c2545..e473cd6 100644 --- a/next.config.js +++ b/next.config.js @@ -1,16 +1,17 @@ -/** @type {import('next').NextConfig} */ - const basePath = process.env.NEXT_PUBLIC_BASE_PATH || ''; const nextConfig = { reactStrictMode: true, - // AntD ships CJS + uses some patterns that benefit from transpilation in the App Router. - transpilePackages: ['antd', '@ant-design/icons', 'rc-util', 'rc-pagination', 'rc-picker'], + transpilePackages: [ + 'antd', + '@ant-design/icons', + 'rc-util', + 'rc-pagination', + 'rc-picker' + ], - output: 'export', - - images: {unoptimized: true}, + output: 'standalone', trailingSlash: true, @@ -18,4 +19,4 @@ const nextConfig = { assetPrefix: basePath || undefined, }; -module.exports = nextConfig; +module.exports = nextConfig; \ No newline at end of file