Closed wisonlau closed 4 months ago
Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.
You've deployed the mondodb exactly how we said in our readme not to do. You need to make sure mongodb is starting up correctly first.
Also, just as an FYI - we don't test our containers on MacOS so your milage may vary.
Same issue on TurnKey GNU/Linux 17.1 (Debian 11/Bullseye) (running on Proxmox as an LXC container), I then tried to revert back to [8.2.93-ls48] (which was what I was upgrading from) but the DB error was still there so I had to resort to restoring the whole LXC from backup.
version: "2.1" # Docker Compose file version
services: # Define the services to run
unifi-db:
image: mongo:6.0.11
container_name: unifi-db
volumes:
- /DATA/AppData/unifi-network-application/db/data:/data/db # MongoDB data persistence
- /DATA/AppData/unifi-network-application/db/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
ports:
- 27017:27017 # MongoDB default port
restart: unless-stopped # Restart policy
unifi-network-application: # Name of the service
image: lscr.io/linuxserver/unifi-network-application:latest # Docker image to use
container_name: unifi-network-application # Name for the created container
environment: # Environmental variables for the container
- PUID=1000 # User ID
- PGID=1000 # Group ID
- TZ=Europe/Prague # Timezone
- MONGO_HOST=unifi-db # MongoDB host
- MONGO_USER=unifi # MongoDB username
- MONGO_PORT=27017 # MongoDB port
- MONGO_DBNAME=unifi # MongoDB database name
- MEM_LIMIT=1024 #optional # Memory limit for the container
- MEM_STARTUP=1024 #optional # Memory to allocate on container startup
- MONGO_TLS= #optional # MongoDB TLS setting
- MONGO_AUTHSOURCE= #optional # MongoDB authentication source
volumes: # Volumes to mount in the container
- /DATA/AppData/unifi-network-application/config:/config # Map host directory to container directory
ports: # Ports to expose and forward
- 8443:8443 # HTTPS portal
- 3478:3478/udp # STUN service
- 10001:10001/udp # UniFi AP discovery
- 8080:8080 # HTTP portal
- 1900:1900/udp #optional # For DLNA
- 8843:8843 #optional # HTTPS guest portal
- 8880:8880 #optional # HTTP guest portal
- 6789:6789 #optional # Mobile speed test port
- 5514:5514/udp #optional # Remote syslog port
restart: unless-stopped # Restart policy for the container
depends_on:
- unifi-db
Not sure if anything changed on your end but I just did the same exact thing I did earlier today (redeploy the entire stack) and now it seems to work ok...
Please don't same issue
a completely different thing.
OP included things that the readme specifically states not to include.
Your issue is not it. Also keep in mind that we don't support or recommend running docker in lxc. Even the proxmox devs recommend against running docker in lxc.
您已按照我们在自述文件中所说的方式部署了 mondodb。您需要先确保 mongodb 正确启动。
此外,仅供参考 - 我们不会在 MacOS 上测试我们的容器,因此您的里程可能会有所不同。
mongodb
MongoDB is running normally
I can connect normally using Navicat Premium and create a database
Need to delete /Users/wisonlau/wwwroot/docker/unifi-network-application/mongo-data and /Users/wisonlau/wwwroot/docker/unifi-network-application/unifi-data
Is there an existing issue for this?
Current Behavior
I installed Docker Composer on macOS, but the connection to the database timed out
Expected Behavior
No response
Steps To Reproduce
docker-compose up
Environment
CPU architecture
x86-64
Docker creation
Container logs