Compare commits
6 Commits
fix-docker
...
combine-do
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8725658a5 | ||
|
|
e07c75d857 | ||
|
|
f8a791a4fe | ||
|
|
58ba0b1444 | ||
|
|
994a96a0be | ||
|
|
8acb06764a |
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
app/__pychache__
|
||||||
15
Dockerfile
Executable file
15
Dockerfile
Executable file
@@ -0,0 +1,15 @@
|
|||||||
|
FROM python:3.14-slim
|
||||||
|
|
||||||
|
ARG DEBUG_MODE=0
|
||||||
|
ENV FLASK_DEBUG=$DEBUG_MODE
|
||||||
|
ENV FLASK_APP=app
|
||||||
|
|
||||||
|
RUN mkdir /app
|
||||||
|
COPY app/requirements.txt /app
|
||||||
|
RUN pip3 install -r /app/requirements.txt
|
||||||
|
COPY app /app
|
||||||
|
|
||||||
|
ENTRYPOINT ["flask"]
|
||||||
|
CMD ["--app", "app", "run", "--host=0.0.0.0", "--port=80"]
|
||||||
|
|
||||||
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
FROM python:3.10-slim AS builder
|
|
||||||
|
|
||||||
ARG DEBUG_MODE=0
|
|
||||||
ENV FLASK_DEBUG=$DEBUG_MODE
|
|
||||||
ENV FLASK_APP=app
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
COPY requirements.txt
|
|
||||||
|
|
||||||
RUN pip3 install -r requirements.txt
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
|
|
||||||
EXPOSE 443
|
|
||||||
ENTRYPOINT ["flask"]
|
|
||||||
# CMD [ "run", "--host=0.0.0.0", "--port=80"]
|
|
||||||
CMD ["--app", "app", "run", "--host=0.0.0.0", "--port=443"]
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,2 +1,4 @@
|
|||||||
flask
|
flask
|
||||||
markdown
|
markdown
|
||||||
|
obsidianmd-parser
|
||||||
|
GitPython
|
||||||
|
|||||||
@@ -1,15 +1,9 @@
|
|||||||
services:
|
services:
|
||||||
app:
|
app:
|
||||||
build:
|
build:
|
||||||
context: app
|
|
||||||
args:
|
args:
|
||||||
- DEBUG_MODE=1
|
- DEBUG_MODE=1
|
||||||
ports:
|
ports:
|
||||||
- '80:80'
|
- '80:80'
|
||||||
volumes:
|
volumes:
|
||||||
- ./content:/content
|
- ./content:/content
|
||||||
# public_vault_builder:
|
|
||||||
# build:
|
|
||||||
# context: public_vault_builder
|
|
||||||
# volumes:
|
|
||||||
# - ./public_vault:/content
|
|
||||||
|
|||||||
@@ -1,14 +0,0 @@
|
|||||||
FROM python:3.12-slim
|
|
||||||
|
|
||||||
|
|
||||||
run mkdir /public-vault
|
|
||||||
|
|
||||||
WORKDIR /build
|
|
||||||
|
|
||||||
COPY requirements.txt .
|
|
||||||
|
|
||||||
RUN pip3 install -r requirements.txt
|
|
||||||
|
|
||||||
COPY . .
|
|
||||||
|
|
||||||
CMD ["python", "build.py"]
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
from obsidian_parser import Vault
|
|
||||||
import shutil
|
|
||||||
from git import Repo
|
|
||||||
|
|
||||||
|
|
||||||
# repo_url = "https://gitlab.com/username/my-vault.git"
|
|
||||||
dest = "/content"
|
|
||||||
src = "Personal-Wiki"
|
|
||||||
# Load a vault
|
|
||||||
vault = Vault(src)
|
|
||||||
|
|
||||||
if vault:
|
|
||||||
print ("found vault")
|
|
||||||
else:
|
|
||||||
print("could not find vault")
|
|
||||||
|
|
||||||
# Find notes by exact name
|
|
||||||
note = vault.get_note("test")
|
|
||||||
|
|
||||||
# Findd all public notes
|
|
||||||
publicNotes = vault.get_notes_with_tag("public")
|
|
||||||
|
|
||||||
for note in publicNotes:
|
|
||||||
print(note.title)
|
|
||||||
shutil.copy2(f"{note.path}", dest)
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
obsidianmd-parser
|
|
||||||
GitPython
|
|
||||||
Reference in New Issue
Block a user