diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..bac877d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +FROM node:18-alpine + +WORKDIR /app + +# Copy package files +COPY package*.json ./ +RUN npm ci --only=production + +# Copy app files +COPY . . + +# Build the app +RUN npm run build + +EXPOSE 3000 + +CMD ["npm", "start"] \ No newline at end of file diff --git a/app/globals.css b/app/globals.css new file mode 100644 index 0000000..cb9ffdc --- /dev/null +++ b/app/globals.css @@ -0,0 +1,15 @@ +@tailwind base; +@tailwind components; +@tailwind utilities; + +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +body { + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif; + background: linear-gradient(135deg, #0f172a 0%, #581c87 50%, #0f172a 100%); + min-height: 100vh; +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..6977832 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.8' + +services: + dashboard: + build: . + ports: + - "3000:3000" + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + environment: + - NODE_ENV=production + networks: + - dokploy_default + labels: + - "traefik.enable=true" + - "traefik.http.routers.dashboard.rule=Host(`dashboard.yourdomain.com`)" + - "traefik.http.services.dashboard.loadbalancer.server.port=3000" + - "traefik.http.routers.dashboard.tls.certResolver=letsencrypt" + +networks: + dokploy_default: + external: true \ No newline at end of file diff --git a/next.config.js b/next.config.js new file mode 100644 index 0000000..d62ca87 --- /dev/null +++ b/next.config.js @@ -0,0 +1,17 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + experimental: { + appDir: true, + }, + // Allow access to Docker socket + webpack: (config, { isServer }) => { + if (isServer) { + config.externals.push({ + 'dockerode': 'dockerode' + }); + } + return config; + } +}; + +module.exports = nextConfig; \ No newline at end of file diff --git a/package.json b/package.json new file mode 100644 index 0000000..327c7fc --- /dev/null +++ b/package.json @@ -0,0 +1,21 @@ +{ + "name": "dokploy-dashboard-pro", + "version": "1.0.0", + "description": "Modern Docker container management dashboard for Dokploy", + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "next": "^14.0.0", + "react": "^18.0.0", + "react-dom": "^18.0.0", + "dockerode": "^3.3.5", + "lucide-react": "^0.263.1" + }, + "engines": { + "node": ">=18.0.0" + } +} \ No newline at end of file