dex
dex copied to clipboard
failed to initialize storage: failed to perform migrations: creating migration table: unable to open database file: no such file or directory
trafficstars
Preflight Checklist
- [X] I agree to follow the Code of Conduct that this project adheres to.
- [X] I have searched the issue tracker for an issue that matches the one I want to file, without success.
- [X] I am not looking for support or already pursued the available support channels without success.
Version
2.41.1
Storage Type
SQLite
Installation Type
Official container image
Expected Behavior
it work well
Actual Behavior
time=2024-12-30T14:05:03.635Z level=INFO msg="Version info" dex_version=v2.41.1 go.version=go1.22.5 go.os=linux go.arch=amd64 time=2024-12-30T14:05:03.635Z level=INFO msg="config issuer" issuer=https://dex.mydomain.com failed to initialize storage: failed to perform migrations: creating migration table: unable to open database file: no such file or directory
Steps To Reproduce
- on centos (it work well on mac)
- run docker-compose up -d
Additional Information
No response
Configuration
docker-compose.yaml
dex:
container_name: dex
image: ghcr.io/dexidp/dex:v2.41.1
restart: unless-stopped
hostname: dex
# ports:
# - 5556
extra_hosts:
- host.docker.internal:host-gateway
configs:
- source: dex_config
target: /etc/dex/config.yaml
volumes:
- ../dev-ops-repo/dex/data:/data
environment:
- DEX_LOG_LEVEL=debug
command: ["dex", "serve", "/etc/dex/config.yaml"]
labels:
- "traefik.enable=true"
- "traefik.http.services.dex.loadbalancer.server.port=5556"
- "traefik.http.routers.dex.service=dex"
- "traefik.http.routers.dex.rule=Host(`dex.${SERVER_DOMAIN:-localhost}`)"
- "traefik.http.routers.dex.entrypoints=websecure"
configs:
dex_config:
content: |
issuer: https://dex.${SERVER_DOMAIN:-localhost}
storage:
type: sqlite3
config:
file: /data/dex.db
web:
http: 0.0.0.0:5556
connectors:
- type: oauth
id: wecom
name: WeCom
config:
clientID: xxx
clientSecret: xxx
redirectURI: https://dex.${SERVER_DOMAIN:-localhost}/callback
tokenURL: https://qyapi.weixin.gq.com/cgi-bin/gettoken?corpid=xxx&corpsecret=xxx
authorizationURL: https://login.work.weixin.qq.com/wwlogin/sso/login?login_type=CorpApp&appid=xxx&agentid=xxx
userInfoURL: https://qyapi.weixin.qq.com/cgi-bin/auth/getuserinfo
scopes:
- snsapi_base
oauth2:
skipApprovalScreen: true
alwaysShowLoginScreen: false
staticClients:
- id: whoami
name: whoami
secret: xxx
redirectURIs:
- https://whoami.${SERVER_DOMAIN:-localhost}/callback
Logs
time=2024-12-30T14:05:03.635Z level=INFO msg="Version info" dex_version=v2.41.1 go.version=go1.22.5 go.os=linux go.arch=amd64
time=2024-12-30T14:05:03.635Z level=INFO msg="config issuer" issuer=https://dex.mydomain.com
failed to initialize storage: failed to perform migrations: creating migration table: unable to open database file: no such file or directory