Skip to content

Nguyen-HanhNong/landing-page

Repository files navigation

Landing Page

HTML5 CSS3 JavaScript React Github API

GitHub contributors GitHub stars GitHub forks GitHub issues GitHub license Node Version npm Version

About The Project

Image of Landing Page

This project contains the code for my personal landing page, which can be found at nnong.dev. The landing page is built using React and styled with Tailwind CSS.

Getting Started

Prerequisites

  • For Docker setup: Docker and Docker Compose installed. Download Docker here.
  • For local setup: Node.js and npm. If you do not have Node.js installed, you can download it here.
  • The project will also require git and a valid GitHub account to run. You can download git here.

Running with Docker (Recommended)

Docker provides a simple, consistent environment for running the application without needing to install Node.js locally.

Quick Start

  1. Clone the repository

    git clone https://github.com/Nguyen-HanhNong/landing-page.git
    cd landing-page
  2. Start the application with Docker Compose

    docker-compose up
  3. Open the project in your browser

    http://localhost:3000/
    

The application will automatically reload when you make changes to the source code.

Docker Commands

  • Start the application: docker-compose up
  • Start in detached mode (background): docker-compose up -d
  • Stop the application: docker-compose down
  • View logs: docker-compose logs -f
  • Rebuild containers (after dependency changes): docker-compose up --build
  • Access container shell: docker-compose exec app sh

Alternative: Using Docker directly

If you prefer using Docker directly without Docker Compose:

  1. Build the Docker image

    docker build -t landing-page .
  2. Run the container

    docker run -p 3000:3000 -v $(pwd):/app -v /app/node_modules landing-page

Running Locally (Without Docker)

If you prefer to run the application without Docker:

  1. Clone the repository

    git clone https://github.com/Nguyen-HanhNong/landing-page.git
    cd landing-page
  2. Install NPM packages

    npm install
  3. Run the project

    npm run start
  4. Open the project in your browser

    http://localhost:3000/
    

Deployment to GitHub Pages

The Docker setup is only for local development. GitHub Pages deployment remains unchanged and works exactly as before:

  1. Build the project

    npm run build
  2. Deploy to GitHub Pages

    npm run deploy

Or use the custom deploy script:

npm run custom-deploy

The Docker files (Dockerfile, docker-compose.yml, .dockerignore) are ignored during GitHub Pages deployment and will not interfere with the deployment process.

License

Distributed under the GNU General Public License v3.0. See LICENSE for more information.