From 1a5c88eb5d51457451723979eb5a3a22802470ab Mon Sep 17 00:00:00 2001 From: apatil Date: Tue, 6 May 2025 03:40:43 +0100 Subject: [PATCH] Add first blog post --- src/posts/first-post.md | 10 ----- src/posts/raspi-5-docker-p1.md | 77 ++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+), 10 deletions(-) delete mode 100644 src/posts/first-post.md create mode 100644 src/posts/raspi-5-docker-p1.md diff --git a/src/posts/first-post.md b/src/posts/first-post.md deleted file mode 100644 index 93a0867..0000000 --- a/src/posts/first-post.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -title: 'My First Post' -date: '2025-05-01' -slug: 'first-post' -excerpt: 'This is an excerpt from the first post.' ---- - -# First Heading - -Welcome to my blog post written in **Markdown**. diff --git a/src/posts/raspi-5-docker-p1.md b/src/posts/raspi-5-docker-p1.md new file mode 100644 index 0000000..b55dc88 --- /dev/null +++ b/src/posts/raspi-5-docker-p1.md @@ -0,0 +1,77 @@ +--- +title: 'Raspberry Pi 5: Part-1: Install Docker and Gitea' +date: '2025-05-01' +slug: 'raspi-5-docker-p1' +excerpt: 'Setting up docker to containerize UI app and back-end with CI/CD' +--- + +# Getting started + +Welcome to the series where I will be setting up a mini server to host your own website. We will do a self hosted git server. Then we will install woodpecker, a lightweight CI/CD system to trigger pipelines in push to git repo. And then we will setup Grafana to monitor the traffic to Raspberry Pi 5. We will then add TLS with Caddy and also add some reverse proxy and also do port forwarding for more security. + +## Installing Docker + +```shell +sudo apt update && sudo apt upgrade -y +``` + +```shell +curl -sSL https:..get.docker.com | sh +sudo usermod -aG docker $USER +``` + +## Installing Gitea + +```shell +mkdir -p ~/gitea +cd ~/gitea +``` + +Create the docker-compose.yaml: + +```yaml +version: '3' + +services: + gitea: + image: gitea/gitea:latest + container_name: gitea + environment: + - USER_UID=1000 + - USER_GID=1000 + restart: always + volumes: + - ./gitea:/data + ports: + - '3000:3000' + - '2222:22' +``` + +Launch Gitea: + +```shell +docker compose up -d +``` + +Create admin user: + +```shell +docker exec -it gitea /bin/bash +``` + +```shell +gitea admin use create \ + --username youradmin \ + --password yourpassword \ + --email you@example.com \ + --admin \ + --must-change-password=false +``` + +Exit the container + +```shell +exit +``` + +Login to the browser at `http://localhost:3000`