Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Production branch builds are broken due to postgres no longer serving buster repository #3439

Open
ChrisW-B opened this issue Sep 27, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@ChrisW-B
Copy link

Describe the bug
When trying to start up bookwyrm on a self hosted server, you can no longer do so as postgres's apt repository no longer includes buster

To Reproduce
Steps to reproduce the behavior:

  1. Clear your docker builds
  2. Run ./bw-dev up
  3. See error

Expected behavior
bookwyrm should build normally

Screenshots
apt reports first
404 Not Found [IP: 147.75.85.69 80]
and then fails with
E: The repository 'http://apt.postgresql.org/pub/repos/apt buster-pgdg Release' does not have a Release file.

Instance
Selfhosted, latest commit on production branch

@ChrisW-B ChrisW-B added the bug Something isn't working label Sep 27, 2024
@qisantanu
Copy link

Let us know if any solution acheived.
I am facing this:
image

@ChrisW-B
Copy link
Author

ChrisW-B commented Sep 27, 2024

As a temp fix, you can update postgres-docker/Dockerfile in two places:

on line 1,

- FROM postgres:13.0 
+ FROM postgres:13.16

and on line 18

- RUN awk '$0 ~ /^\t_main "\$@"$/ { print "\tif [[ $1 == cron ]]; then\n\t\techo \"POSTGRES_DB=${POSTGRES_DB}\" > /backups/.env\n\t\techo \"POSTGRES_USER=${POSTGRES_USER}\" >> /backups/.env\n\t\tservice cron start\n\t\tshift\n\tfi" }{ print }' docker-entrypoint.sh > bookwyrm-entrypoint.sh
+ RUN awk '$0 ~ /^\t_main "\$@"$/ { print "\tif [[ $1 == cron ]]; then\n\t\techo \"POSTGRES_DB=${POSTGRES_DB}\" > /backups/.env\n\t\techo \"POSTGRES_USER=${POSTGRES_USER}\" >> /backups/.env\n\t\tservice cron start\n\t\tshift\n\tfi" }{ print }' /usr/local/bin/docker-entrypoint.sh > bookwyrm-entrypoint.sh

postgres moved the place of their entrypoint file, so you can't just update postgres. I'm not sure if the package maintainers want a specific version of postgres, so I'm hesitant to add a PR

@CypherJack
Copy link

I face the same issue I will try your temp fix thanks !

@qisantanu
Copy link

I started using:

RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - \ && echo 'deb http://apt.postgresql.org/pub/repos/apt/ bookworm-pgdg main' $PG_MAJOR > /etc/apt/sources.list.d/pgdg.list

lo48576 added a commit to lo48576/bookwyrm that referenced this issue Oct 15, 2024
This is necessary to avoid container build failure. See
<bookwyrm-social#3439 (comment)>.
lo48576 added a commit to lo48576/bookwyrm that referenced this issue Oct 15, 2024
This is necessary to avoid container build failure. See
<bookwyrm-social#3439 (comment)>.
lo48576 added a commit to lo48576/bookwyrm that referenced this issue Oct 15, 2024
This is necessary to avoid container build failure. See
<bookwyrm-social#3439 (comment)>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants