最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

postgresql - How to connect local Postgres DB to SHLINK docker Image - Stack Overflow

programmeradmin2浏览0评论

Hi I am trying to connect shlink docker image with local postgres db, in logs I dont see the error but there are no table present in the database. below is my docker-compose.yml file

version: '3.8'

services:
  shlink:
    image: shlinkio/shlink:latest
    container_name: shlink
    environment:
      SHLINK_DB_DRIVER: postgres
      SHLINK_DB_HOST: host.docker.internal  # Replace with your local host (e.g., "localhost" or IP address)
      SHLINK_DB_PORT: 5432                # Port for PostgreSQL
      SHLINK_DB_USER: root   # Replace with your DB username
      SHLINK_DB_PASSWORD:  # Replace with your DB password
      SHLINK_DB_NAME: Shlink_db       # Replace with the name of your database
    ports:
      - "8080:8080"
    restart: always


As I am logging to via


psql -U root -d shlink
 \dt

is giving no relation found Please help what wrong I am doing

发布评论

评论列表(0)

  1. 暂无评论