azukaar / Cosmos-Server

☁️ The Most Secure and Easy Selfhosted Home Server. Take control of your data and privacy without sacrificing security and stability (Authentication, anti-DDOS, anti-bot)
https://cosmos-cloud.io
Other
3.15k stars 113 forks source link

[BUG]: Database is never created. #24

Closed PassiveLemon closed 1 year ago

PassiveLemon commented 1 year ago

What happened?

After the docker section of the setup shows as successful, the database portion will get stuck on connecting, even if the option to create a database is selected.

What should have happened?

According to the docs, it should create its own database in around 20-30 seconds.

How to reproduce the bug?

  1. Create container using docker-compose
  2. Get to the database portion of the setup
  3. Observe

Relevant log output

It will spam this into the docker log:

2023/06/07 13:46:25 [INFO] SmartShield: Request received
2023/06/07 13:46:25 [INFO] API: Status
2023/06/07 13:46:25 [INFO] (Re) Connecting to the database...
2023/06/07 13:46:25 [ERROR] Status: Database error : error parsing uri: scheme must be "mongodb" or "mongodb+srv"

Other details

 cosmos:
    image: azukaar/cosmos-server:latest
    container_name: cosmos
    restart: 'always'
    ports:
      - 23080:80/tcp
      - 22443:443/tcp
    volumes:
      - /home/docker/Containers/Test/Cosmos:/config
      - /var/run/docker.sock:/var/run/docker.sock

It also does the same thing when running with docker run

System details

PassiveLemon commented 1 year ago

It appears that this is an issue with docker-compose. Starting it with docker run will eventually create the database container. I'll keep this open just for others though

azukaar commented 1 year ago

hi thanks for submission! It is a known issue with Debian 11 + Docker compose, I will close this for now but I will def spend time trying to figure if I can somehow work around this as it happens to a lot of people thanks again!

MohamedElashri commented 11 months ago

I want to confirm that this problem still occurs with Debian 12.

azukaar commented 11 months ago

I want to confirm that this problem still occurs with Debian 12.

The specific issue this ticket fixed definitely doesn't, the DB is consistently created on a blank slate D12 image It is possible that you are experiencing a similar issue but with a different root cause thought. If you can give me some details on your setup and some logs I'll be able to look into it!