Change mongodb listening port
Closed this issue · 2 comments
b2r66sun commented
I change the mongodb port from 27017 to 27018 because 27017 has already been used for another db service, but I got this log.
05:03:26 <INFO:SLF4JLogger> Exception in monitor thread while connecting to server localhost:27017
So I'm wondering whether the mongodb port shouldn't be changed?
docker-compose:
version: '3'
services:
mongodb:
image: mongo
restart: unless-stopped
ports:
- "27018:27017"
volumes:
- /data/grasscutter/db:/data/db
grasscutter:
image: siakbary/dockergc:ubuntu-dev-5.7
command: -d 'mongodb://mongodb:27018' -b 'localhost' -f 'yes'
restart: unless-stopped
volumes:
- /data/grasscutter/resources:/home/Grasscutter/resources
ports:
- "22102:22102/udp"
- "23337:443/tcp"
- "23336:80/tcp"
depends_on:
- mongodb
stdin_open: true
tty: true
volumes:
data:
resources:
akbaryahya commented
port 27018 you can access outside containers (public) and port 27017 you can still use inside containers because it only communicates between containers, isolated from the outside
b2r66sun commented
thanks, closing this issue.