Comments (8)
Hey! Thanks for creating the issue!
Not yet, but it was in my plans!
from promnesia.
BTW, I played a bit more with docker and docker-compose lately, and managed to pack in most of Promnesia along with dependencies.. I'll share it soon-ish!
from promnesia.
Thanks for merging this feature. I call it initial commit because it could and should be extended.
Current feature allows build for "local" testing/running.
To further streamline docker as viable deployment method I would like to have a lightweight image available in DockerHub.
I'm proposing creating docker/alpine/Dockerfile
and have that automatically build tags.
There is one more improvement that could be made and that is python dependencies. Right now Dockerfile has hardcoded pip install ...
instead it could be using setup.py
from the root repo.
Flavors that could be developed:
- Docker shell image that mounts volume on top of src directory to have python dependencies environment and ability to edit code with favorite local editor (emacs).
- Docker image that installs master branch and volumes are only used to store promnesia.sqlite database.
- Docker image that installs python latest python module. Bonus add args during build to control version installed as well as dependencies.
In any case the merge gives us some start to build other features.
from promnesia.
I prefer:
docker-compose.yml
env_file:
- default.env
- private.env
...
.gitignore
private.env
Name private.env
however you like of course.
from promnesia.
Flavors that could be developed:
...
oh wow that'd be next level
from promnesia.
Snippet from my personal compose file, ideally I'd like the one some thing like this
version: "3.7"
# define volume mappings (so it's possible to reuse them later)
x-cache: &cache
{ source: /tmp/promnesia-cache,
target: /tmp/promnesia-cache,
type: bind }
# keep paths mapping as intact as possible; makes it simpler to setup & debug
x-backups: &backups
{ source: /path/to/backups,
target: /path/to/backups,
type: bind, read_only: True }
# .... other volumes
# define as much as possible here to avoid duplication
x-promnesia-base: &promnesia-base
build: { dockerfile: promnesia.Dockerfile, context: . }
user: '1000:1000'
volumes: [*setup, *promnesia-env,
*hpi-cfg,
*cache,
*backups, *polar,
*logs, *notes, *zim,
{ source: /code/promnesia,
target: /code/promnesia,
type: bind, read_only: True },
]
services:
promnesia_setup:
<<: *promnesia-base
entrypoint: /code/promnesia/docker-setup.sh
promnesia_index:
<<: *promnesia-base
environment:
- PROMNESIA_CORES=8
- PROMNESIA_FD_EXTRA_ARGS=--ignore-file /code/promnesia/ignored
entrypoint: /code/promnesia/scripts/promnesia index
promnesia_index_quick:
<<: *promnesia-base
environment:
# I fucking hate yaml, can't reuse parts of arrays...
- PROMNESIA_CORES=8
- PROMNESIA_FD_EXTRA_ARGS=--ignore-file /code/promnesia/ignored
- PROMNESIA_INDEX_POLICY=update
entrypoint: /code/promnesia/scripts/promnesia index --config /.config/promnesia/quick_config.py
promnesia_serve:
<<: *promnesia-base
restart: unless-stopped
entrypoint: /code/promnesia/scripts/promnesia serve
ports: ["13131:13131"]
from promnesia.
# I fucking hate yaml, can't reuse parts of arrays...
I agree!
Normally what I did for environment variables is to create a shared .env
file, and put the service-specific overrides into <service>.env
file. Then include them with env_file
(https://docs.docker.com/compose/compose-file/#env_file):
env_file:
- .env
- <service>.env
It does require you to checkin your .env
file though...
from promnesia.
Are there instructions anywhere on how to build the docker container and how to use it with my local knowledge base (either obsidian, logseq etc...)?
Can Docker refer to my notes which are outside the container?
from promnesia.
Related Issues (20)
- Build fails in OpenBSD HOT 7
- "do not mark this link" interacts badly with fragments
- Add the possibility to index the .mm format
- Visited marks repeat to fill region HOT 1
- "422 Unprocessable Entity" on every page. HOT 2
- Sidebar doesn't show up on firefox HOT 3
- Not opened sidebar - Firefox HOT 2
- Not a directory: 'xdg-mime' while promnesia index HOT 1
- promnesia config create error HOT 1
- Extension error due to duplicated backslash HOT 1
- unable to build extension in Windows HOT 3
- raise CachewException(f"{tp}: doesn't look like a supported type to cache HOT 1
- POST /visits 500 Internal Server Error HOT 3
- fastapi/pydantic breaking versions HOT 2
- running multiple indexers simulatneously blocks the database
- Sidebar does not show in Firefox HOT 2
- Filters in config.py to exclude websites
- How to control the length of context while indexing
- Question: How to run promnesia cli tool without Python?
- AttributeError: 'pydantic_core._pydantic_core.Url' object has no attribute 'strip' HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from promnesia.