Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wikijs ignores the defined port number in docker-compose.yml #33

Closed
1 task done
callahan22 opened this issue Apr 8, 2024 · 2 comments
Closed
1 task done

Wikijs ignores the defined port number in docker-compose.yml #33

callahan22 opened this issue Apr 8, 2024 · 2 comments

Comments

@callahan22
Copy link

callahan22 commented Apr 8, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Wikijs ignores the defined port number in docker-compose.yml.

Expected Behavior

wikijs should try to connect on the port specified in the config.

Steps To Reproduce

Details below.

Environment

- OS: Ubuntu 22.04LTS.

CPU architecture

x86-64

Docker creation

**docker-compose-yml**

  wiki-db:
    image: postgres:16
    container_name: wiki-db
    restart: unless-stopped
    labels:
    # Auto update via WatchTower
      - "com.centurylinklabs.watchtower.enable"
    environment:
      - POSTGRES_DB=wiki
      - POSTGRES_USER=wikijs
      - POSTGRES_PASSWORD=password
    restart: unless-stopped
    volumes:
      - ./wiki-db/data:/var/lib/postgresql/data

  wikijs:
    image: lscr.io/linuxserver/wikijs:latest
    container_name: wikijs
    restart: unless-stopped
    depends_on:
      - wiki-db
    labels:
    # Auto update via WatchTower
      - "com.centurylinklabs.watchtower.enable"
    environment:
      - TZ=Etc/UTC
      - DB_TYPE=postgres
      - DB_HOST=wiki-db
      - DB_PORT=5432
      - DB_NAME=wiki
      - DB_USER=wikijs
      - DB_PASS=password
    volumes:
      - ./wikijs/config:/config
      - ./wikijs/data:/data
    ports:
      - 3000:3000


### Container logs

```bash
**Logs**
**wikijs**

2024-04-08T18:30:02.363Z [MASTER] info: Initializing...
2024-04-08T18:30:03.154Z [MASTER] info: Using database driver pg for postgres [ OK ]
2024-04-08T18:30:03.158Z [MASTER] info: Connecting to database...
2024-04-08T18:30:03.182Z [MASTER] error: Database Connection Error: ECONNREFUSED 172.19.0.7:3306
2024-04-08T18:30:03.182Z [MASTER] warn: Will retry in 3 seconds... [Attempt 1 of 10]
2024-04-08T18:30:06.187Z [MASTER] info: Connecting to database...
2024-04-08T18:30:06.189Z [MASTER] error: Database Connection Error: ECONNREFUSED 172.19.0.7:3306

wiki-db

2024-04-08 18:29:50.695 UTC [1] LOG:  starting PostgreSQL 16.2 (Debian 16.2-1.pgdg120+2) on x86_64-pc-lin                                     ux-gnu, compiled by gcc (Debian 12.2.0-14) 12.2.0, 64-bit
2024-04-08 18:29:50.696 UTC [1] LOG:  listening on IPv4 address "0.0.0.0", port 5432
2024-04-08 18:29:50.697 UTC [1] LOG:  listening on IPv6 address "::", port 5432
2024-04-08 18:29:50.705 UTC [1] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
Copy link

github-actions bot commented Apr 8, 2024

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@callahan22
Copy link
Author

Looks like this might have been the config file getting created on first run then changing the port in the docker-compose.yml file post first deployment, meant that it was still using the config file and ignoring the env variable. You can ignore this report!

@LinuxServer-CI LinuxServer-CI moved this from Issues to Done in Issue & PR Tracker Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant