9 Replies
<#1362692895425036318>
Category
Help needed
Product
Coder (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hey @saun, were you able to solve this?
Nope, any thoughts what could have gone wrong?
is this on a new Coder deployment?
Yes
could you share your config?
services:
coder:
# This MUST be stable for our documentation and
# other automations.
image: ghcr.io/coder/coder:${CODER_VERSION:-latest}
ports:
- "7080:7080"
environment:
CODER_OAUTH2_GITHUB_ALLOW_SIGNUPS: true
CODER_OAUTH2_GITHUB_DEFAULT_PROVIDER_ENABLE: false
CODER_OAUTH2_GITHUB_DEVICE_FLOW: true
CODER_OAUTH2_GITHUB_ALLOWED_ORGS: 2CentsCapital
CODER_OAUTH2_GITHUB_CLIENT_ID: "${CODER_OAUTH2_GITHUB_CLIENT_ID}"
CODER_OAUTH2_GITHUB_CLIENT_SECRET: "${CODER_OAUTH2_GITHUB_CLIENT_SECRET}"
CODER_EXTERNAL_AUTH_0_ID: github
CODER_EXTERNAL_AUTH_0_TYPE: github
CODER_EXTERNAL_AUTH_0_CLIENT_ID: "${CODER_EXTERNAL_AUTH_0_CLIENT_ID}"
CODER_EXTERNAL_AUTH_0_CLIENT_SECRET: "${CODER_EXTERNAL_AUTH_0_CLIENT_SECRET}"
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"
CODER_ACCESS_URL: "${CODER_ACCESS_URL}"
CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT: "${CODER_NOTIFICATIONS_WEBHOOK_ENDPOINT}"
group_add:
- "998" # docker group on host
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- coder_home:/home/coder
depends_on:
database:
condition: servicehealthy
database:
# Minimum supported version is 13.
# More versions here: https://hub.docker.com//postgres
image: "postgres:16"
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-username} # The PostgreSQL user (useful to connect to the database)
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password} # The PostgreSQL password (useful to connect to the database)
POSTGRES_DB: ${POSTGRES_DB:-coder} # The PostgreSQL default database (automatically created at first launch)
volumes:
- coder_data:/var/lib/postgresql/data # Use "docker volume rm coder_coder_data" to reset Coder
healthcheck:
test:
[
"CMD-SHELL",
"pg_isready -U ${POSTGRES_USER:-username} -d ${POSTGRES_DB:-coder}",
]
interval: 5s
timeout: 5s
retries: 5
volumes:
coder_data:
coder_home:
postgres - Official Image | Docker Hub
The PostgreSQL object-relational database system provides reliability and data integrity.
This is my docker compose file
I tried using v2.21.0 still the same issue, at least coder is up
But here I just changed the version using .env, to 2.19.1
I am getting following error and the docker is getting exited
2025-04-23 10:39:05.498 [erro] connect to postgres failed ...
error= up:
github.com/coder/coder/v2/coderd/database/migrations.UpWithFS
/home/runner/work/coder/coder/coderd/database/migrations/migrate.go:137
- no migration found for version 313: read down for version 313 .: file does not exist
Encountered an error running "coder server", see "coder server --help" for more information
error: connect to postgres: connect to postgres: migrate up: up: no migration found for version 313: read down for version 313 .: file does not exist
i'll try to reproduce tomorrow, I think i know what's up
yeah we don't support downgrading