Skip to content

πŸ‘¨πŸ»β€πŸ’» Personal profile+blog created using Gatsby, React & GraphQL.

License

Notifications You must be signed in to change notification settings

sydrawat01/sydrawat.dev

Repository files navigation

sydrawat

sydrawat

License: MIT

Netlify Status

This is my personal profile/blog where I write down my thought and notes about the interesting stuff I'm learning about the web everyday!

Important

This website is using an older build of GatsbyJS, so in order to run this project successfully, you'll need Node v14.21.3

πŸš€ Quick start

  1. Clone the repo

    git clone https://github.com/sydrawat/sydrawat.git
  2. Install dependencies

    Navigate into the site’s directory and install the dependencies.

    yarn install
  3. Start developing.

    cd sydrawat/
    yarn develop
  4. View your site!

    The site is now running at http://localhost:8000!

    Note: You'll also see a second link:http://localhost:8000/___graphql. This is the GraphiQL tool you can use to experiment with querying your data. Learn more about using this tool in the Gatsby tutorial.

NOTE : For deployment, follow the Gatsby AWS S3 guide for more detailed steps on how to deploy the site on AWS. If you're looking for different resources to deploy/host your site, have a look here.

🐳 Containerization

The containerized image of this personal website is available on hub.docker.com/r/sydrawat/sydrawat.dev. In order to use this locally, or to deploy this on a Kubernetes cluster, make sure you use the appropriate image and tag names.

  1. Local Development with Docker

    docker pull sydrawat/sydrawat.dev:<tag>
    # docker pull sydrawat/sydrawat.dev:latest
  2. Run the container locally

    # The -p option exposes the application running on port 8000 on the container
    # to port 8000 on the host machine running the container
    docker run -p 8000:8000 sydrawat/sydrawat.dev

    The application should now be accessible on http://localhost:8000

  3. Deployment on Kubernetes

    Deployment on Kubernetes can vary, depending on how you want your application to be available. This is a simple example on how to run the website, which is containerized, as a Pod on a Kubernetes cluster.

    kubectl run sydrawat --image=sydrawat/sydrawat.dev:latest

    Next, we need to expose the application on a NodePort:

    apiVersion: v1
    kind: Service
    metadata:
      labels:
        app: sydrawat-svc
      name: sydrawat-svc
      namespace: default
    spec:
      ports:
      - name: 8000-8000
        nodePort: 31136
        port: 8000
        protocol: TCP
        targetPort: 8000
      selector:
        run: sydrawat
      type: NodePort

    You can now test the application running on http://:31136 To identify what node your Pod is running on, use:

    kubectl get pods -o wide # identify the node on which this pod is running
    kubectl get nodes -o wide # get the node-ip

πŸ‘₯ Acknowledgements

πŸ‘€ Author

πŸ“ƒ License

This project is open source and available under the MIT License.

πŸ”© Creating Issues πŸ”§

Before you create an issue, please go through the Code of Conduct and follow the structure of template provided for raising an issue.

Thanks for reporting the problem!

Β© 2024, Siddharth Rawat