You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I apologize if this is at all off-topic, but I was unsure how to proceed.
I am running this as a Stack in Portainer, and it seems to be functioning well, however I was looking to test out accessing the database directly and, while able to bind to console and start psql and see the tables from database as adventure, querying any table shows no results. Certainly a step is being missed, but it's unknown what, exactly.
Provide an obfuscateddocker-compose.yml
services:
web:
#build: ./frontend/
image: ghcr.io/seanmorley15/adventurelog-frontend:latest
container_name: adventurelog-frontend
restart: unless-stopped
environment:
- PUBLIC_SERVER_URL=http://server:8000 # Should be the service name of the backend with port 8000, even if you change the port in the backend service
- ORIGIN=***.dev
- BODY_SIZE_LIMIT=Infinity
ports:
- "8015:3000"
depends_on:
- server
db:
image: tobi312/rpi-postgresql-postgis:15-3.3-alpine-arm
container_name: adventurelog-db
restart: unless-stopped
environment:
POSTGRES_DB: database
POSTGRES_USER: adventure
POSTGRES_PASSWORD: ***
volumes:
- postgres_data:/var/lib/postgresql/data/
server:
#build: ./backend/
image: ghcr.io/seanmorley15/adventurelog-backend:latest
container_name: adventurelog-backend
restart: unless-stopped
environment:
- PGHOST=db
- PGDATABASE=database
- PGUSER=adventure
- PGPASSWORD=***
- SECRET_KEY=***
- DJANGO_ADMIN_USERNAME=admin
- DJANGO_ADMIN_PASSWORD=admin
- DJANGO_ADMIN_EMAIL=***
- PUBLIC_URL=http://localhost:8016 # Match the outward port, used for the creation of image urls
- CSRF_TRUSTED_ORIGINS=http://localhost:8016,http://localhost:8015 # Comma separated list of trusted origins for CSRF
- DEBUG=False
- FRONTEND_URL=***.dev # Used for email generation. This should be the url of the frontend
ports:
- "8016:80"
depends_on:
- db
volumes:
- adventurelog_media:/code/media/
volumes:
postgres_data:
adventurelog_media:
Provide any necessary logs from the containers and browser
database-# \conninfo
You are connected to database "database" as user "adventure" on host "db" (address "172.21.0.2") at port "5432".
database-# SELECT * FROM users_customuser
The text was updated successfully, but these errors were encountered:
I just did some testing to try for myself. I see what you are talking about, the issue stems from a permissions issue for security. When I run \z users_customuser to check my permissions for it I get Access privileges being blank. I can run SELECT COUNT(*) FROM users_customuser and it will return the correct count. I would recommend using a tool like DBeaver or I personally use JetBrains DATAGrip to view the schema and manipulate data (although the Django admin site is super helpful for this too)! Let me know if you have any questions - I am not entirely an expert on PSQL commands but I hope this helps clear it up a bit
Explain your issue
I apologize if this is at all off-topic, but I was unsure how to proceed.
I am running this as a Stack in Portainer, and it seems to be functioning well, however I was looking to test out accessing the database directly and, while able to bind to console and start
psql
and see the tables fromdatabase
asadventure
, querying any table shows no results. Certainly a step is being missed, but it's unknown what, exactly.Provide an obfuscated
docker-compose.yml
Provide any necessary logs from the containers and browser
The text was updated successfully, but these errors were encountered: