Made OCI compliant; monochrome icon added

This commit is contained in:
Ignacio Rivero
2026-06-22 15:48:05 -03:00
parent 34733206c2
commit f58237ccab
5 changed files with 62 additions and 2 deletions

29
Containerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM python:3.14-slim
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1
WORKDIR /app
# Optional but useful for Pillow runtime compatibility in slim images
RUN apt-get update && apt-get install -y --no-install-recommends \
libjpeg62-turbo \
zlib1g \
&& rm -rf /var/lib/apt/lists/*
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
# Non-root runtime user
RUN useradd -m -u 10001 catnote && chown -R catnote:catnote /app
USER catnote
EXPOSE 5000
# BLEHD_SOCKET can be overridden at runtime
ENV BLEHD_SOCKET=/run/bleh/blehd.sock
CMD ["python", "app.py", "--port", "5000"]

4
app.py
View File

@@ -649,6 +649,10 @@ def icon_maskable():
def icon_rounded():
return send_from_directory('static', 'icon512_rounded.png')
@app.route('/icon512_monochrome.png')
def icon_monochrome():
return send_from_directory('static', 'icon512_monochrome.png')
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='CatNote: Server for Markdown to MXW01 Cat Printer')
parser.add_argument('-p', '--port', type=int, default=5000, help='Port to run the server on (default: 5000)')

10
compose.yaml Normal file
View File

@@ -0,0 +1,10 @@
services:
server:
build: .
ports:
- "8000:5000"
restart: unless-stopped
volumes:
- /run/bleh/blehd.sock:/run/bleh/blehd.sock:rw
group_add:
- "1001"

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@@ -1 +1,18 @@
{"theme_color":"#22282c","background_color":"#22282c","icons":[{"purpose":"maskable","sizes":"512x512","src":"icon512_maskable.png","type":"image/png"},{"purpose":"any","sizes":"512x512","src":"icon512_rounded.png","type":"image/png"}],"orientation":"any","display":"standalone","dir":"auto","lang":"es-UY","start_url":"https://catnote.netpaws.cc","scope":"https://catnote.netpaws.cc","name":"CatNote","short_name":"CatNote","id":"cc.netpaws.catnote"}
{
"theme_color": "#22282c",
"background_color": "#22282c",
"icons": [
{ "purpose": "maskable", "sizes": "512x512", "src": "icon512_maskable.png", "type": "image/png" },
{ "purpose": "any", "sizes": "512x512", "src": "icon512_rounded.png", "type": "image/png" },
{ "purpose": "monochrome", "sizes": "512x512", "src": "icon512_monochrome.png", "type": "image/png" }
],
"orientation": "any",
"display": "standalone",
"dir": "auto",
"lang": "es-UY",
"start_url": "https://catnote.netpaws.cc/",
"scope": "https://catnote.netpaws.cc/",
"name": "CatNote",
"short_name": "CatNote",
"id": "/"
}