Docker中的Gitlab:postgresql不接受连接

问题描述 投票:0回答:1

我正在尝试使用docker创建一个非常简单的Gitlab实例。我有这个docker-compose.yml文件(大部分直接来自文档):

gitlab:
    image: gitlab/gitlab-ce:latest
    restart: always
    hostname: gitlab.${DOMAIN}
    ports:
        - 8081:8081
    environment:
        - VIRTUAL_HOST=gitlab.${DOMAIN}
        - VIRTUAL_PORT=8081
    volumes:
        - ${DATA_PATH}/gitlab/config:/etc/gitlab
        - ${DATA_PATH}/gitlab/logs:/var/log/gitlab
        - ${DATA_PATH}/gitlab/data:/var/opt/gitlab

问题是每当我尝试升级此图像时,我都会收到错误:

PG::ConnectionBad: could not connect to server: No such file or directory. Is the server running locally and accepting connections on Unix domain socket "/var/opt/gitlab/postgresql/.s.PGSQL.5432"?

我在OSX 10.13.6上运行Docker for Mac 18.06.1-ce

有没有解决的办法 ?

docker docker-compose gitlab
1个回答
0
投票

所以我修好了。原来macOS(显然是?)对路径长度的限制。我的码头图像超出了这个限制....

© www.soinside.com 2019 - 2024. All rights reserved.