Updated Coder version and now I’m getting database errors with Docker Compose
Earlier this week I got a message that Coder had a new version. I upgraded and now I’m getting an error when running the docker compose. It’s showing that the user authentication for the DB failed. Tried looking for existing discussions on this issue but could not find anything. How should I fix the DB connection?
9 Replies
<#1258984713385676850>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
Can you share your docker compose file? Have you made any changes?
@Atif Here’s my docker compose. I’ve been trying to figure out how to solve an issue with getting vscode-web running with a wildcard url. It was working for me and stopped working so I have been changing the wildcard urls in the docker compose file. Besides that, I have not changed anything else.
version: "3.9"
services:
tailscale:
image: tailscale/tailscale:latest
hostname: tailscale
ports:
- "TAILSCALE_IP:7080:7080"
- "TAILSCALE_IP:13338:13338"
environment:
- TS_AUTHKEY=tskey-auth-keygoeshere
- TS_STATE_DIR=/var/lib/tailscale
- TS_USERSPACE=false
volumes:
- ${PWD}/tailscale-nginx/state:/var/lib/tailscale
- /dev/net/tun:/dev/net/tun
cap_add:
- net_admin
- sys_module
restart: unless-stopped
coder:
# This MUST be stable for our documentation and
# other automations.
image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
#ports:
#- "TAILSCALE_IP:7080"
environment:
CODER_PG_CONNECTION_URL: "postgresql://${POSTGRES_USER:-username}:${POSTGRES_PASSWORD:-password}@database/${POSTGRES_DB:-coder}?sslmode=disable"
CODER_HTTP_ADDRESS: "0.0.0.0:7080"
# You'll need to set CODER_ACCESS_URL to an IP or domain
# that workspaces can reach. This cannot be localhost
# or 127.0.0.1 for non-Docker templates!
CODER_ACCESS_URL: "${CODER_ACCESS_URL}"
CODER_WILDCARD_ACCESS_URL: "*.coder.myserver.com"
# If the coder user does not have write permissions on
# the docker socket, you can uncomment the following
# lines and set the group ID to one that has write
# permissions on the docker socket.
group_add:
- "999" # docker group on host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
database:
condition: service_healthy
hey
did you figure this out?
otherwise reset the password for the databse user and update the
CODER_PG_CONNECTION_URL
environment variable@Phorcys Hey, so I tried this and still seeing the error. I even deleted the container volume with
docker volume rm coder_coder_data
. To clarify, I set the env variables to new values for