Skip to content
1oannisPublic

About

1oannis.com

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

Note

Copyright 2024 - present Ioannis Theodosiadis, SEOULTECH University

This project is licensed under the MIT License. Please note that while the code is open source, the logo and branding of 1oannis.com are proprietary and not covered by the MIT License. See LICENCE file in the project root for details.

This is a Next.js project bootstrapped with shadcn which houses the personal website of 1oannis.

Contents

Getting Started

Important

This project requires at minimum a node.js v20 installation.

In order to speed up the installation process pnpm is used instead of npm.

npm install -g pnpm

Now install the dependencies.

pnpm install

Deploy the DEV Server

You can develop easily on your local machine by using the built-in dev server.

pnpm dev

Deploy the PROD Server

In order to create a production deployment you need to build the project first.

pnpm build

Now you can start the build.

pnpm start

Tip

Open http://localhost:3000 with your browser to see the result.

Dockerization

This project can be containerized with Docker for easy deployment.

Important

This step requires at minimum a Docker Engine installation.

Build and Deploy an Image

In order to build an image you only have to specify the tag and correct Dockerfile.

docker build -t the1oannis/homepage:1.0.0 -f ./Dockerfile.prod .

For easier accessibility you can forward the port to 80 when you run the container.

docker run -p 80:3000 the1oannis/homepage:1.0.0

Tip

Open http://localhost with your browser to see the result.


Use Docker Compose

Note

Notice how you just used a pretty boring and manual way to dockerize an application. Also take a look at the different Dockerfiles prod / dev and the docker-compose.yaml in the project root.

Let's say you want to remotely develop on the website and you want to use Docker for that. There is a neat feature called Compose Watch which basically enables hot-reloading in containers.

In order to make use of that you can simply run the given docker-compose.yaml.

service:
  dev:
    ...
    environment:
      - WATCHPACK_POLLING=true
    ...

Note

The WATHCPACK_POLLING flag enables the hot-reloading for the deployment.

Deploy the dev container and go to http://localhost.

Dev Container

docker compose up dev

Tip

Watch how the container will rebuild when changes in the files are detected.

You can undeploy the container at any time.

docker compose down dev

Prod Container

docker compose up prod

Important

Prod does not allow hot-reload. However it provides a faster way to build and deploy the prod image.

You can undeploy the container at any time.

docker compose down prod

Learn More

To learn more about the projects techstack, take a look at the following resources:

About

1oannis.com

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages