forked from mirrors/bookwyrm
Merge pull request #1717 from cincodenada/no-more-fedireads
Remove last lingering traces of fedireads name
This commit is contained in:
commit
5cc4f9d381
4 changed files with 11 additions and 7 deletions
|
@ -6,7 +6,7 @@ from bookwyrm import activitystreams, models
|
||||||
def populate_streams(stream=None):
|
def populate_streams(stream=None):
|
||||||
"""build all the streams for all the users"""
|
"""build all the streams for all the users"""
|
||||||
streams = [stream] if stream else activitystreams.streams.keys()
|
streams = [stream] if stream else activitystreams.streams.keys()
|
||||||
print("Populations streams", streams)
|
print("Populating streams", streams)
|
||||||
users = models.User.objects.filter(
|
users = models.User.objects.filter(
|
||||||
local=True,
|
local=True,
|
||||||
is_active=True,
|
is_active=True,
|
||||||
|
|
|
@ -125,9 +125,9 @@ STREAMS = [
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": {
|
"default": {
|
||||||
"ENGINE": "django.db.backends.postgresql_psycopg2",
|
"ENGINE": "django.db.backends.postgresql_psycopg2",
|
||||||
"NAME": env("POSTGRES_DB", "fedireads"),
|
"NAME": env("POSTGRES_DB", "bookwyrm"),
|
||||||
"USER": env("POSTGRES_USER", "fedireads"),
|
"USER": env("POSTGRES_USER", "bookwyrm"),
|
||||||
"PASSWORD": env("POSTGRES_PASSWORD", "fedireads"),
|
"PASSWORD": env("POSTGRES_PASSWORD", "bookwyrm"),
|
||||||
"HOST": env("POSTGRES_HOST", ""),
|
"HOST": env("POSTGRES_HOST", ""),
|
||||||
"PORT": env("PGPORT", 5432),
|
"PORT": env("PGPORT", 5432),
|
||||||
},
|
},
|
||||||
|
|
|
@ -5,7 +5,7 @@ RUN mkdir /backups
|
||||||
COPY ./backup.sh /backups
|
COPY ./backup.sh /backups
|
||||||
COPY ./weed.sh /backups
|
COPY ./weed.sh /backups
|
||||||
COPY ./cronfile /etc/cron.d/cronfile
|
COPY ./cronfile /etc/cron.d/cronfile
|
||||||
RUN apt-get update && apt-get -y install cron
|
RUN apt-get update && apt-get -y --no-install-recommends install cron
|
||||||
RUN chmod 0644 /etc/cron.d/cronfile
|
RUN chmod 0644 /etc/cron.d/cronfile
|
||||||
RUN crontab /etc/cron.d/cronfile
|
RUN crontab /etc/cron.d/cronfile
|
||||||
RUN touch /var/log/cron.log
|
RUN touch /var/log/cron.log
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
filename=backup__$(date +%F)
|
if [ -z "$POSTGRES_DB" ]; then
|
||||||
pg_dump -U fedireads > /backups/$filename.sql
|
echo "Database not specified, defaulting to bookwyrm"
|
||||||
|
fi
|
||||||
|
BACKUP_DB=${POSTGRES_DB:-bookwyrm}
|
||||||
|
filename=backup_${BACKUP_DB}_$(date +%F)
|
||||||
|
pg_dump -U $BACKUP_DB > /backups/$filename.sql
|
||||||
|
|
Loading…
Reference in a new issue