Skip to content
This repository has been archived by the owner on Aug 28, 2024. It is now read-only.

Taiga don't connect to postgres #85

Open
evandroteixeira1710 opened this issue Apr 20, 2021 · 2 comments
Open

Taiga don't connect to postgres #85

evandroteixeira1710 opened this issue Apr 20, 2021 · 2 comments

Comments

@evandroteixeira1710
Copy link

Good morning people,
Today I started testing Taiga for the company I work for, created taiga.yml and went up with the docker-compose -f taiga.yml up -d.
When I check the taiga log, it is looping for not connecting to the database.
"Failed to connect to database server or database does not exist.
Running database check
Connecting to database:
dbname = 'taigadb' user = 'taiga' host = 'localhost' password = 'password'
Traceback (most recent call last):
File "/checkdb.py", line 14, in
conn = psycopg2.connect (conn_string)
File "/usr/local/lib/python3.5/site-packages/psycopg2/init.py", line 130, in connect
conn = _connect (dsn, connection_factory = connection_factory, ** kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP / IP connections on port 5432?
could not connect to server: Network is unreachable
Is the server running on host "localhost" (:: 1) and accepting
TCP / IP connections on port 5432? "

My taiga.yml

version: '3'

services:
taiga:
container_name: Taiga
image: benhutchins / taiga
restart: always
build: ../
ports:

  • 8085: 80

- 443: 443 # To enable SSL, uncomment this line. See "Enable SSL" below.

depends_on:

  • db

To enable taiga-events, uncomment the following lines:

- events

- rabbit

- redis

environment:

Hostname for your instance of Taiga. Required.

TAIGA_HOSTNAME: localhost

Database variables. Required.

TAIGA_DB_HOST: localhost
TAIGA_DB_NAME: taigadb
TAIGA_DB_USER: taiga
TAIGA_DB_PASSWORD: password

# Enable SSL internally, within the Docker container. Optional.
# This is not great. I suggest using something on top of this
# to enable SSL. See the example example-nginx-ssl.conf file
# for an alternative way to enable SSL.
# TAIGA_SSL: 'True'

# Enable SSL externally, preferred method
# TAIGA_SSL_BY_REVERSE_PROXY: 'True'

volumes:
# Media and uploads directory. Required (or you will lose all uploads)
- ./media:/usr/src/taiga-back/media

# Taiga configuration directory. Makes it easier to change configuration.
- ./taiga-conf:/taiga

db:
container_name: Postgres_taiga
image: postgres: 9.6
environment:
POSTGRES_DB: taigadb
POSTGRES_USER: taiga
POSTGRES_PASSWORD: password
ports:

  • 49155: 5432
    volumes:

Postgres data directory. This ensures the database is not lost.

  • ./pgdata:/var/lib/postgresql/data

OBS. I can access via pgadmin and connecting to postgres as well.

@dnx-xy
Copy link

dnx-xy commented Jul 16, 2021

i experienced the same aswel

@dnx-xy
Copy link

dnx-xy commented Jul 16, 2021

i've found the solution. after added linked postgres container to taiga. add environment in taiga
TAIGA_DB_HOST={{aliasnameoflinking}}

it will work

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants