Open TheBig-O opened 1 week ago
So there are a few things that hopefully help:
PUBLIC_SERVER_URL
it just has PUBLIC_URL
which is what generates a url for the images, so make sure that your image nginx container is accessible and make this match. I have always just used the default nginx container and proxied it again for web use as something like cdn.adventurelog.app, but I'm sure there are ways to do it in one. This would mean just using the plain nginx config provided in the docs without change.SRF_TRUSTED_ORIGINS
and make sure its CSRF_TRUSTED_ORIGINS
although its probably not necessary for this issue.PUBLIC_SERVER_URL=http://server:8000
is used because the stack is in the same docker network.image: postgis/postgis:15-3.3
FRONTEND_URL
in the backend is just used for emails so make sure its the domain of the frontendI love that you are using AdventureLog and I really hope this helps 🤞!
You! Are! The! Man!
After updating from your instructions, things are working as expect. The only issue I had was the conversion from postrges to postgis. When I added that, I got a few errors in the DB log and it refused to start. I hesitant to ditch the postrgres because I haven't figured out a way to export an SQL file that I can re-import into postgis. If you have any tips here, please let pass them along.
Thanks for the quick response and help in getting this going. I can't believe I hopes the environment variables, but I'm glad I asked! Still loving it!!
I am super happy to hear its working now! Regarding the postgis migration, it should be automatic after switching the image and updating the container. Here is what I recommend:
docker compose pull
docker compose up -d
to start it all up.I hope you enjoy your trip!
Well...
When I swapped out the image tag fro the postgis, I get an error about compatibility:
The data directory was initialized by PostgreSQL version 16, which is not compatible with this version 15.4 (Debian 15.4-1.pgdg110+1).
Apparently, it doesn't like that my PostgreSQL is version 16. Is there a simple way to export everything from the current database, delete the container, and reestablish the container with postgis?
Everything is working now, but I want to make sure I'm running this in its optimal form.
I really am enjoying this app.
Hmm... I wonder if using this tag based on Postgres 16 will help: postgis/postgis:16-3.4
This seems to be a newer version. If it works let me know so I can update the compose file!
So, new error, but this may be fixable. I just won't get a chance to fix it tonight.
DETAIL: The database was created using collation version 2.36, but the operating system provides version 2.31.
HINT: Rebuild all objects in this database that use the default collation and run ALTER DATABASE database REFRESH COLLATION VERSION, or build PostgreSQL with the right library version.
Tomorrow, I'll open up the database and get the hint a shot unless you have any thoughts on other options. (After backing up, of course.)
I will add though, the app is up and running even with this database warning. I can access it just fine through its web address.
Okay, I think I'm back up and running with everything sorted out. I fixed the collation error by opening up the database in a psql
command line and running these two commands:
REINDEX DATABASE postgres;
ALTER DATABASE postgres REFRESH COLLATION VERSION;
While I was in there, I vacuumed the database and reindexed it. The site is up and running with no issues. Best part? I got it all done before leaving this weekend! Thanks for your help in getting me going.
If I was going to make any suggestions about changing the docker-compose, I would add something about fixing the collation. It's dead simple on the command line, but may not be obvious to some.
I'm so glad to hear it's working! I will keep this issue open so I remember to fix the docker compose. I hope you have fun on your trip 😁 Enjoy!
I forgot to add one command that may help people with the command line. So, here's all of the necessary commands for those who want to give it a go.
# If you're using docker, you need to get into the database container so that you can work with psql.
docker exec -u 0 -it adventurelog_db bash
# Initiate a psql database connection (assumes database is named postgres with a user named adventure.)
psql -h localhost -d postgres -U adventure -p 5432
# Reindex the database
REINDEX DATABASE postgres;
# Perform the collation alteration
ALTER DATABASE postgres REFRESH COLLATION VERSION;
# Exit psql
\q
Hope this helps someone!
This has been kicking my butt for two days. I have tried multiple configurations and nothing seems to work. I can access Adventure Log from the public url and I can log in just fine. There are no images though. Each adventure image is a missing image box and is listed with an address pointing at the local host with an address like:
http://127.0.0.1:8000/media/images/image_cWwEzGa.webp
.I have proxied the nginx container with:
I have also tried variations of the nginx.conf with no success.
The below is my docker-compose.yml:
What am I doing wrong? Why can't I figure out how to show images? Do I need to proxy the NGINX container as well? If so, where would I reference it in the other containers? I don't see anything that specifically points to the address:port.
I have running web server containers and can point the server and web frontend at that, so I don't really need the nginx container, but my real concern is just getting this running with an ability to access it from the internet. I'm leaving on a trip this week and would love to be able to document it with this Adventure Log. Thanks for the help. I love the app and have entered a ton of stuff, but would love to access it from the internet as well.