-
Notifications
You must be signed in to change notification settings - Fork 74
Invalid DB Type Error when run docker-compse in ubuntu #252
Comments
MongoDB is not supported on Wiki.js 2.x |
@Smankusors what versions support MongoDB? |
1.x |
thanks, @Smankusors let me try that |
I changed the version of the wikijs from 2.2 to 1.0. Then it shows this error. wikijs_1 | 2020-04-08 11:59:50,365 INFO spawned: 'wikijs' with pid 7 I think config.yml is available and it's path is correct. |
@NGPixel any way to fix this? |
You can't just replace the version number and expect it to work. |
I set db connection string to: mongodb://wikidb:27017/wiki. WikiJs port is:- '8080:3000' and config.yml port set to 8080. And didn't change any other settings. But i'm getting the same error. |
Question
I tried to run wikijs and MongoDB services using docker-compose on ubuntu 18.04. I set up config.yml file
//Port the server should listen to
port: 80
db:
type: mongodb
// PostgreSQL / MySQL / MariaDB / MS SQL Server only:
host: localhost
port: 5432
user: wikijs
pass: wikijsrocks
db: wiki
ssl: false
Then I configured docker-compose.yml file with wikijs and MongoDB services.
version: '3'
services:
wikidb:
image: mongo:3
expose:
- '27017'
command: '--smallfiles --bind_ip ::,0.0.0.0'
environment:
- 'MONGO_LOG_DIR=/dev/null'
volumes:
- $HOME/volumes/mongo/db:/data/db
wikijs:
image: 'requarks/wiki:latest'
links:
- wikidb
depends_on:
- wikidb
ports:
- '80:80'
environment:
WIKI_ADMIN_EMAIL: [email protected]
volumes:
- $HOME/volumes/wiki/config.yml:/var/wiki/config.yml
I changed the database parameter in the config using these commands
SEARCH="mongodb://localhost:27017/wiki"
REPLACE="mongodb://wikidb:27017/wiki"
FILEPATH="$HOME/volumes/wiki/config.yml"
sed -i "s;$SEARCH;$REPLACE;" $FILEPATH
Finally i run the docker-compose up on the terminal.
It pulled both mongoDB and wikijs containers successfully but finally showed this error.
wikijs_1 | Loading configuration from /wiki/config.yml... OK
wikijs_1 | 2020-04-08T05:29:44.323Z [MASTER] info: ==============================
wikijs_1 | 2020-04-08T05:29:44.327Z [MASTER] info: = Wiki.js 2.2.51 ====================
wikijs_1 | 2020-04-08T05:29:44.328Z [MASTER] info: ==============================
wikijs_1 | 2020-04-08T05:29:44.328Z [MASTER] info: Initializing...
wiki_wikidb_1 exited with code 1
wikijs_1 | 2020-04-08T05:29:44.663Z [MASTER] error: Invalid DB Type
wiki_wikijs_1 exited with code 1
There is no spacing issues in both .yml files. Also I disabled git. Can someone help me to figure this out?
Host Info (please complete the following information):
OS: [e.g. Ubuntu 18.04, Docker]
Wiki.js version: [e.g. 2.2]
Database engine: [e.g. mongodb:3 ]
The text was updated successfully, but these errors were encountered: