mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-14 02:34:27 +00:00
Fix Docker setup
This commit is contained in:
parent
dda4d22880
commit
b5b8162cfa
4 changed files with 24 additions and 8 deletions
5
Makefile
5
Makefile
|
@ -5,3 +5,8 @@ PWD=$(shell pwd)
|
|||
config:
|
||||
# Run and remove instantly
|
||||
-docker run --rm -it --volume `pwd`/data:/app/data microblogpub/microblogpub inv configuration-wizard
|
||||
-docker run --env MICROBLOGPUB_CONFIG_FILE=tests.toml --rm -it --volume `pwd`/data:/app/data --volume `pwd`/app/static:/app/app/static microblogpub/microblogpub inv configuration-wizard
|
||||
|
||||
.PHONY: update
|
||||
update:
|
||||
-docker run --volume `pwd`/data:/app/data --volume `pwd`/app/static:/app/app/static microblogpub/microblogpub inv update
|
||||
|
|
|
@ -10,19 +10,19 @@ command=uvicorn app.main:app --no-server-header --fd 0
|
|||
numprocs=2
|
||||
process_name=uvicorn-%(process_num)d
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
stdout_logfile=data/uvicorn.log
|
||||
stdout_logfile_maxbytes=50MB
|
||||
|
||||
[program:incoming_worker]
|
||||
command=inv process-incoming-activities
|
||||
numproc=1
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
stdout_logfile=data/incoming.log
|
||||
stdout_logfile_maxbytes=50MB
|
||||
|
||||
[program:outgoing_worker]
|
||||
command=inv process-outgoing-activities
|
||||
numproc=1
|
||||
redirect_stderr=true
|
||||
stdout_logfile=/dev/fd/1
|
||||
stdout_logfile_maxbytes=0
|
||||
stdout_logfile=data/outgoing.log
|
||||
stdout_logfile_maxbytes=50MB
|
||||
|
|
|
@ -8,6 +8,7 @@ import bcrypt
|
|||
import tomli_w
|
||||
from markdown import markdown # type: ignore
|
||||
from prompt_toolkit import prompt
|
||||
from prompt_toolkit.key_binding import KeyBindings
|
||||
|
||||
from app.key import generate_key
|
||||
|
||||
|
@ -15,6 +16,15 @@ _ROOT_DIR = Path().parent.resolve()
|
|||
_KEY_PATH = _ROOT_DIR / "data" / "key.pem"
|
||||
|
||||
|
||||
_kb = KeyBindings()
|
||||
|
||||
|
||||
@_kb.add("c-@")
|
||||
def _(event):
|
||||
"""Save multi-line buffer on CTRL + space"""
|
||||
event.current_buffer.validate_and_handle()
|
||||
|
||||
|
||||
def main() -> None:
|
||||
print("Welcome to microblog.pub setup wizard\n")
|
||||
print("Generating key...")
|
||||
|
@ -52,8 +62,9 @@ def main() -> None:
|
|||
prompt(
|
||||
(
|
||||
"summary (short description, in markdown, "
|
||||
"press [ESC] then [ENTER] to submit):\n"
|
||||
"press [CTRL] + [SPACE] to submit):\n"
|
||||
),
|
||||
key_bindings=_kb,
|
||||
multiline=True,
|
||||
)
|
||||
)
|
||||
|
|
2
tasks.py
2
tasks.py
|
@ -141,7 +141,7 @@ def install_deps(ctx):
|
|||
run("poetry install", pty=True, echo=True)
|
||||
|
||||
|
||||
@task(install_deps, compile_scss, migrate_db)
|
||||
@task(compile_scss, migrate_db)
|
||||
def update(ctx):
|
||||
# type: (Context) -> None
|
||||
print("Done")
|
||||
|
|
Loading…
Reference in a new issue