mirror of
https://git.sr.ht/~tsileo/microblog.pub
synced 2024-11-14 18:54:27 +00:00
Delay poussetaches processing at startup
This commit is contained in:
parent
885af6ae6e
commit
6e11ecce5b
3 changed files with 5 additions and 1 deletions
|
@ -51,6 +51,7 @@ def verify_pass(pwd):
|
||||||
@blueprint.route("/admin/update_actor")
|
@blueprint.route("/admin/update_actor")
|
||||||
@login_required
|
@login_required
|
||||||
def admin_update_actor() -> _Response:
|
def admin_update_actor() -> _Response:
|
||||||
|
# FIXME(tsileo): make this a task, and keep track of our own actor_hash at startup
|
||||||
update = ap.Update(
|
update = ap.Update(
|
||||||
actor=MY_PERSON.id,
|
actor=MY_PERSON.id,
|
||||||
object=MY_PERSON.to_dict(),
|
object=MY_PERSON.to_dict(),
|
||||||
|
|
|
@ -3,7 +3,7 @@ services:
|
||||||
web:
|
web:
|
||||||
image: 'microblogpub:latest'
|
image: 'microblogpub:latest'
|
||||||
ports:
|
ports:
|
||||||
- "${WEB_PORT}:5005"
|
- "127.0.0.1:${WEB_PORT}:5005"
|
||||||
volumes:
|
volumes:
|
||||||
- "${CONFIG_DIR}:/app/config"
|
- "${CONFIG_DIR}:/app/config"
|
||||||
- "./static:/app/static"
|
- "./static:/app/static"
|
||||||
|
@ -23,3 +23,5 @@ services:
|
||||||
- "${DATA_DIR}/poussetaches:/app/poussetaches_data"
|
- "${DATA_DIR}/poussetaches:/app/poussetaches_data"
|
||||||
environment:
|
environment:
|
||||||
- POUSSETACHES_AUTH_KEY=${POUSSETACHES_AUTH_KEY}
|
- POUSSETACHES_AUTH_KEY=${POUSSETACHES_AUTH_KEY}
|
||||||
|
# ports:
|
||||||
|
# - "127.0.0.1:${POUSSETACHES_PORT}:7991"
|
||||||
|
|
1
run.sh
1
run.sh
|
@ -1,4 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
python -c "import logging; logging.basicConfig(level=logging.DEBUG); from core import migrations; migrations.perform()"
|
python -c "import logging; logging.basicConfig(level=logging.DEBUG); from core import migrations; migrations.perform()"
|
||||||
python -c "from core import indexes; indexes.create_indexes()"
|
python -c "from core import indexes; indexes.create_indexes()"
|
||||||
|
(sleep 5 && curl -X POST -u :$POUSETACHES_AUTH_KEY $MICROBLOGPUB_POUSSETACHES_HOST/resume)&
|
||||||
gunicorn -t 600 -w 5 -b 0.0.0.0:5005 --log-level debug app:app
|
gunicorn -t 600 -w 5 -b 0.0.0.0:5005 --log-level debug app:app
|
||||||
|
|
Loading…
Reference in a new issue