Next.js Portfolio Template with Docker

Modern portfolio website template built with Next.js, Tailwind CSS, and Docker.

Features

Core Dependencies

Configuration Files

Git Configuration

.gitignore

node_modules/
.next/
.env*
.DS_Store
*.pem
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
.vercel

Docker Configuration

.dockerignore

node_modules
.next
.git
.env*

docker-compose.yml (Production)

version: '3.8'
services:
  web:
    build:
      context: .
      dockerfile: Dockerfile
    ports:
      - "805:805"
    environment:
      - NODE_ENV=production
      - PORT=805
    restart: unless-stopped

docker-compose.dev.yml (Development)

version: '3.8'
services:
  web-dev:
    build:
      context: .
      dockerfile: Dockerfile.dev
    ports:
      - "3000:3000"
    volumes:
      - .:/app
      - /app/node_modules
      - /app/.next
    environment:
      - NODE_ENV=development
    command: pnpm dev

Development Setup

  1. Install PNPM: corepack enable && corepack prepare pnpm@latest --activate
  2. Install dependencies: pnpm install
  3. Run development server: docker compose -f docker-compose.dev.yml up

Production Deployment

  1. Build and run: docker compose up -d
  2. Access site on port 805

Portainer Deployment Steps

  1. Add stack in Portainer
  2. Configure GitHub repository access
  3. Set compose path to docker-compose.yml
  4. Deploy and monitor through Portainer UI

Project Structure

Best Practices