Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 16ef30de83 | |||
| a45397d003 | |||
| eec6fd4b3d | |||
| 7c3c2cc41e |
@@ -0,0 +1,46 @@
|
|||||||
|
name: Release
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
types: [closed]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
if: github.event.pull_request.merged == true && startsWith(github.head_ref, 'v')
|
||||||
|
runs-on: build-htz-01
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Extract Version
|
||||||
|
id: get_version
|
||||||
|
run: echo "VERSION=${{ github.head_ref }}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Generate Changelog
|
||||||
|
id: changelog
|
||||||
|
uses: https://github.com/metcalfc/changelog-generator@v4.6.2
|
||||||
|
with:
|
||||||
|
myToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build and push Docker image
|
||||||
|
run: |
|
||||||
|
VERSION=${{ steps.get_version.outputs.VERSION }}
|
||||||
|
docker build -t cr.jdbnet.co.uk/public/echolog:$VERSION \
|
||||||
|
-t cr.jdbnet.co.uk/public/echolog:latest \
|
||||||
|
--build-arg VERSION=$VERSION \
|
||||||
|
.
|
||||||
|
docker push cr.jdbnet.co.uk/public/echolog:$VERSION
|
||||||
|
docker push cr.jdbnet.co.uk/public/echolog:latest
|
||||||
|
|
||||||
|
- name: Create Gitea Release
|
||||||
|
uses: https://gitea.com/actions/gitea-release-action@v1
|
||||||
|
with:
|
||||||
|
tag_name: ${{ steps.get_version.outputs.VERSION }}
|
||||||
|
name: ${{ steps.get_version.outputs.VERSION }}
|
||||||
|
body: ${{ steps.changelog.outputs.changelog }}
|
||||||
|
draft: false
|
||||||
|
prerelease: false
|
||||||
@@ -1,72 +0,0 @@
|
|||||||
name: Release Please
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
packages: write
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release-please:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
outputs:
|
|
||||||
release_created: ${{ steps.release.outputs.release_created }}
|
|
||||||
steps:
|
|
||||||
- uses: googleapis/release-please-action@v4
|
|
||||||
id: release
|
|
||||||
with:
|
|
||||||
manifest-file: .release-please-manifest.json
|
|
||||||
config-file: .release-please-config.json
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Log in to GitHub Container Registry
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
uses: docker/login-action@v3
|
|
||||||
with:
|
|
||||||
registry: ghcr.io
|
|
||||||
username: ${{ github.actor }}
|
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- name: Read version
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
id: version
|
|
||||||
run: |
|
|
||||||
VERSION=$(cat VERSION)
|
|
||||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
|
||||||
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
||||||
|
|
||||||
- name: Build and push Docker image
|
|
||||||
if: ${{ steps.release.outputs.release_created }}
|
|
||||||
uses: docker/build-push-action@v6
|
|
||||||
with:
|
|
||||||
context: .
|
|
||||||
push: true
|
|
||||||
tags: |
|
|
||||||
ghcr.io/jdb-net/echolog:${{ env.VERSION }}
|
|
||||||
ghcr.io/jdb-net/echolog:latest
|
|
||||||
build-args: |
|
|
||||||
VERSION=${{ env.VERSION }}
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
name: Deploy to Kubernetes
|
|
||||||
needs: release-please
|
|
||||||
if: ${{ needs.release-please.outputs.release_created }}
|
|
||||||
runs-on: [ k3s-lan-01 ]
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Apply manifests
|
|
||||||
run: |
|
|
||||||
sudo kubectl replace -f deployment.yml --grace-period=60 --force
|
|
||||||
@@ -1,10 +0,0 @@
|
|||||||
{
|
|
||||||
"packages": {
|
|
||||||
".": {
|
|
||||||
"release-type": "simple",
|
|
||||||
"version-file": "VERSION"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json"
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
{
|
|
||||||
".": "1.1.2"
|
|
||||||
}
|
|
||||||
@@ -1,33 +0,0 @@
|
|||||||
# Changelog
|
|
||||||
|
|
||||||
## [1.1.2](https://github.com/JDB-NET/echolog/compare/v1.1.1...v1.1.2) (2025-12-14)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* :bug: docker image in readme ([049271b](https://github.com/JDB-NET/echolog/commit/049271baeeaba9266aeac4603dd9f9588fec4bfb))
|
|
||||||
|
|
||||||
## [1.1.1](https://github.com/JDB-NET/echolog/compare/v1.1.0...v1.1.1) (2025-11-02)
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* :bug: image name ([7334fb0](https://github.com/JDB-NET/echolog/commit/7334fb0ec6d077ffa1166f1b1d93194635f9454e))
|
|
||||||
|
|
||||||
## [1.1.0](https://github.com/JDB-NET/echolog/compare/v1.0.0...v1.1.0) (2025-11-02)
|
|
||||||
|
|
||||||
|
|
||||||
### Features
|
|
||||||
|
|
||||||
* :sparkles: add release please ([d2c4e08](https://github.com/JDB-NET/echolog/commit/d2c4e08e397c9e7ab9c30b2c04b04804fb81ad16))
|
|
||||||
* Added favicon and PWA ([1df4920](https://github.com/JDB-NET/echolog/commit/1df49204065529b07f4f6ba6ae8dfd9f74ba74d8))
|
|
||||||
* Added public build ([3187cbb](https://github.com/JDB-NET/echolog/commit/3187cbbcc50e57b6f459f7d5c116a49ad5b15f65))
|
|
||||||
* Added timezone environment variable ([7fb273d](https://github.com/JDB-NET/echolog/commit/7fb273d0abefbeeeaad7b81c244f48501b692f6a))
|
|
||||||
* Initial Commit ([853e78b](https://github.com/JDB-NET/echolog/commit/853e78b45f7c5d38d67d85468e35122250b1080c))
|
|
||||||
* streak counter to count how many days a user has posted consecutively ([200bc97](https://github.com/JDB-NET/echolog/commit/200bc973b8f410e9bba3ef2ace668a02ce33ce74))
|
|
||||||
|
|
||||||
|
|
||||||
### Bug Fixes
|
|
||||||
|
|
||||||
* environment variable names ([22481e5](https://github.com/JDB-NET/echolog/commit/22481e5af28581784ace8b76f666c5d5ece07c3b))
|
|
||||||
* Fixed search ([4c6328c](https://github.com/JDB-NET/echolog/commit/4c6328c2e90a368db07de5a2babf8fd3dac1808b))
|
|
||||||
@@ -1,6 +1,9 @@
|
|||||||
FROM python:3.13-slim
|
FROM python:3.13-slim
|
||||||
|
LABEL org.opencontainers.image.vendor="JDB-NET"
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY . /app
|
COPY . /app
|
||||||
|
ARG VERSION=unknown
|
||||||
|
ENV VERSION=${VERSION}
|
||||||
RUN pip install -r requirements.txt \
|
RUN pip install -r requirements.txt \
|
||||||
&& apt-get update \
|
&& apt-get update \
|
||||||
&& apt-get install curl -y \
|
&& apt-get install curl -y \
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ A Flask-based web application for personal homelab journaling. Track your daily
|
|||||||
- **Daily Journal Entries**: Create and manage journal entries for any date
|
- **Daily Journal Entries**: Create and manage journal entries for any date
|
||||||
- **Streak Tracking**: Automatically calculates consecutive days with entries
|
- **Streak Tracking**: Automatically calculates consecutive days with entries
|
||||||
- **Search Functionality**: Search by keyword or filter by specific date
|
- **Search Functionality**: Search by keyword or filter by specific date
|
||||||
- **PWA Support**: Progressive Web App with offline capabilities and installable on mobile devices
|
- **PWA Support**: Progressive Web App making this installable on mobile devices
|
||||||
- **Modern UI**: Beautiful gradient design with Tailwind CSS and responsive layout
|
- **Modern UI**: Beautiful gradient design with Tailwind CSS and responsive layout
|
||||||
- **Optional Authentication**: Enable login protection with environment variables
|
- **Optional Authentication**: Enable login protection with environment variables
|
||||||
- **MySQL Backend**: Robust data persistence with MySQL/MariaDB
|
- **MySQL Backend**: Robust data persistence with MySQL/MariaDB
|
||||||
@@ -35,7 +35,7 @@ docker run -d \
|
|||||||
-e LOGIN_ENABLED=true \
|
-e LOGIN_ENABLED=true \
|
||||||
-e LOGIN_USERNAME=admin \
|
-e LOGIN_USERNAME=admin \
|
||||||
-e LOGIN_PASSWORD=your_password \
|
-e LOGIN_PASSWORD=your_password \
|
||||||
ghcr.io/jdb-net/echolog:latest
|
cr.jdbnet.co.uk/public/echolog:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker Compose
|
### Docker Compose
|
||||||
@@ -45,7 +45,7 @@ version: '3.8'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
echolog:
|
echolog:
|
||||||
image: ghcr.io/jdb-net/echolog:latest
|
image: cr.jdbnet.co.uk/public/echolog:latest
|
||||||
container_name: echolog
|
container_name: echolog
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
@@ -130,7 +130,7 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: echolog
|
- name: echolog
|
||||||
image: ghcr.io/jdb-net/echolog:latest
|
image: cr.jdbnet.co.uk/public/echolog:latest
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
env:
|
env:
|
||||||
@@ -172,7 +172,6 @@ EchoLog can be installed as a Progressive Web App on supported devices:
|
|||||||
|
|
||||||
- **Mobile**: Add to home screen from browser menu
|
- **Mobile**: Add to home screen from browser menu
|
||||||
- **Desktop**: Install from browser address bar
|
- **Desktop**: Install from browser address bar
|
||||||
- **Offline**: Works offline with cached content
|
|
||||||
|
|
||||||
## Security Notes
|
## Security Notes
|
||||||
|
|
||||||
|
|||||||
@@ -6,17 +6,12 @@ from datetime import datetime, date as datedate, datetime as dt
|
|||||||
import mysql.connector
|
import mysql.connector
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
# Read version from VERSION file
|
load_dotenv()
|
||||||
try:
|
|
||||||
with open('VERSION', 'r') as f:
|
__version__ = os.getenv('VERSION', 'unknown')
|
||||||
__version__ = f.read().strip()
|
|
||||||
except FileNotFoundError:
|
|
||||||
__version__ = 'unknown'
|
|
||||||
|
|
||||||
app = Flask(__name__)
|
app = Flask(__name__)
|
||||||
|
|
||||||
load_dotenv()
|
|
||||||
|
|
||||||
TIMEZONE = os.getenv('TZ', 'UTC')
|
TIMEZONE = os.getenv('TZ', 'UTC')
|
||||||
tz = pytz.timezone(TIMEZONE)
|
tz = pytz.timezone(TIMEZONE)
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -15,14 +15,14 @@ spec:
|
|||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: echolog
|
- name: echolog
|
||||||
image: ghcr.io/jdb-net/echolog:latest
|
image: cr.jdbnet.co.uk/public/echolog:latest
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 5000
|
- containerPort: 5000
|
||||||
name: "echolog"
|
name: "echolog"
|
||||||
env:
|
env:
|
||||||
- name: MYSQL_HOST
|
- name: MYSQL_HOST
|
||||||
value: "10.10.2.27"
|
value: "10.10.25.4"
|
||||||
- name: MYSQL_USER
|
- name: MYSQL_USER
|
||||||
value: "echolog"
|
value: "echolog"
|
||||||
- name: MYSQL_PASSWORD
|
- name: MYSQL_PASSWORD
|
||||||
|
|||||||
@@ -213,7 +213,7 @@
|
|||||||
<footer class="mt-8 py-6 border-t border-gray-800 text-center text-gray-500 text-sm">
|
<footer class="mt-8 py-6 border-t border-gray-800 text-center text-gray-500 text-sm">
|
||||||
<span class="mr-1"><a href="https://www.jdbnet.co.uk" target="_blank" rel="noopener" class="text-gray-500 hover:text-pink-400 hover:underline mx-1">JDB-NET</a> © {{ now.year }}</span>
|
<span class="mr-1"><a href="https://www.jdbnet.co.uk" target="_blank" rel="noopener" class="text-gray-500 hover:text-pink-400 hover:underline mx-1">JDB-NET</a> © {{ now.year }}</span>
|
||||||
·
|
·
|
||||||
<span class="mx-1"><a href="https://github.com/JDB-NET/echolog" target="_blank" rel="noopener" class="text-gray-500 hover:text-pink-400 hover:underline mx-1">v{{ version }}</a></span>
|
<span class="mx-1"><a href="https://github.com/JDB-NET/echolog" target="_blank" rel="noopener" class="text-gray-500 hover:text-pink-400 hover:underline mx-1">{{ version }}</a></span>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user