Add first blog post
This commit is contained in:
parent
38f9c8d7e3
commit
1a5c88eb5d
@ -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**.
|
|
||||||
77
src/posts/raspi-5-docker-p1.md
Normal file
77
src/posts/raspi-5-docker-p1.md
Normal file
@ -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`
|
||||||
Loading…
x
Reference in New Issue
Block a user