Originally created by @Floo33R on GitHub (Jul 5, 2025).
Hi,
i have an issue to migrate to the new version. I didn't realize there are new images out and now i am not able to get the new DB up and running.
My `docker-compose.yml` looks like this:
```
###################################
# 🦎 KOMODO COMPOSE - POSTGRES 🦎 #
###################################
## This compose file will deploy:
## 1. Sqlite + FerretDB Mongo adapter (https://www.ferretdb.com)
## 2. Komodo Core
## 3. Komodo Periphery
services:
copy_database:
image: ghcr.io/moghtech/komodo-util
environment:
MODE: CopyDatabase
SOURCE_URI: mongodb://ferretdb:27017
SOURCE_DB_NAME: ${KOMODO_DATABASE_DB_NAME:-komodo}
TARGET_URI: mongodb://${KOMODO_DB_USERNAME}:${KOMODO_DB_PASSWORD}@ferretdb2:27017
TARGET_DB_NAME: ${KOMODO_DATABASE_DB_NAME:-komodo}
networks:
- komodo
postgres2:
# Recommended: Pin to a specific version
# https://github.com/FerretDB/documentdb/pkgs/container/postgres-documentdb
image: ghcr.io/ferretdb/postgres-documentdb
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
# ports:
# - 5432:5432
volumes:
- /opt/komodo/postgres-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${KOMODO_DB_USERNAME}
POSTGRES_PASSWORD: ${KOMODO_DB_PASSWORD}
POSTGRES_DB: postgres # Do not change
networks:
- komodo
ferretdb2:
# Recommended: Pin to a specific version
# https://github.com/FerretDB/FerretDB/pkgs/container/ferretdb
image: ghcr.io/ferretdb/ferretdb
labels:
komodo.skip: # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
depends_on:
- postgres2
# ports:
# - 27017:27017
volumes:
- /opt/komodo/ferretdb-state:/state
environment:
FERRETDB_POSTGRESQL_URL: postgres://${KOMODO_DB_USERNAME}:${KOMODO_DB_PASSWORD}@postgres2:5432/postgres
networks:
- komodo
ferretdb:
container_name: komodo-ferretdb
image: ghcr.io/ferretdb/ferretdb:1
#user: "1001:999"
labels:
- "services.core.labels.komodo.skip=true" # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local}
networks:
- komodo
ports:
- 27017:27017
volumes:
- /opt/komodo/sqlite-data:/state
environment:
- FERRETDB_HANDLER=sqlite
core:
container_name: komodo-core
image: ghcr.io/mbecker20/komodo:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
#user: "1001:999"
labels:
- "services.core.labels.komodo.skip=true" # Prevent Komodo from stopping with StopAllContainers
- "com.centurylinklabs.watchtower.monitor-only=true"
restart: unless-stopped
depends_on:
- ferretdb
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local}
networks:
- komodo
- proxy
ports:
- 9120:9120
env_file: stack.env
environment:
KOMODO_DATABASE_ADDRESS: ferretdb
volumes:
## Core cache for repos for latest commit hash / contents
- /opt/komodo/repo-cache:/repo-cache
## Store sync files on server
# - /path/to/syncs:/syncs
## Optionally mount a custom core.config.toml
# - /path/to/core.config.toml:/config/config.toml
## Allows for systemd Periphery connection at
## "http://host.docker.internal:8120"
# extra_hosts:
# - host.docker.internal:host-gateway
## Deploy Periphery container using this block,
## or deploy the Periphery binary with systemd using
## https://github.com/mbecker20/komodo/tree/main/scripts
periphery:
container_name: komodo-periphery
image: ghcr.io/mbecker20/periphery:${COMPOSE_KOMODO_IMAGE_TAG:-latest}
security_opt:
- apparmor=unconfined # Allow unconfined AppArmor
#user: "1001:999"
labels:
- "services.core.labels.komodo.skip=true" # Prevent Komodo from stopping with StopAllContainers
restart: unless-stopped
logging:
driver: ${COMPOSE_LOGGING_DRIVER:-local}
networks:
- komodo
env_file: stack.env
volumes:
## Mount external docker socket
- /var/run/docker.sock:/var/run/docker.sock
## Allow Periphery to see processes outside of container
- /proc:/proc
## use self signed certs in docker volume,
## or mount your own signed certs.
- /opt/komodo/ssl-certs:/etc/komodo/ssl
## manage repos in a docker volume,
## or change it to an accessible host directory.
- /opt/komodo/repos:/etc/komodo/repos
## manage stack files in a docker volume,
## or change it to an accessible host directory.
- /opt/komodo/stacks:/etc/komodo/stacks
## Optionally mount a path to store compose files
- /opt/komodo/compose:/host/compose
networks:
komodo:
proxy:
external: true
```
When i try to migrate, the `copy_database` container always writes following error:
```
2025-07-05T17:20:50.780701653Z Error: Invalid SOURCE_URI
```
I tried already several different `SOURCE_URIs`, but it seems like i can't find the right one.
- `mongodb://ferretdb:27017`
- `mongodb://${KOMODO_DB_USERNAME}:${KOMODO_DB_PASSWORD}@ferretdb:27017`
- `mongodb://${KOMODO_DB_USERNAME}:${KOMODO_DB_PASSWORD}@ferretdb:27017/?authMechanism=PLAIN`
Can someone help me out here?
After some research, i found out, what i have to put in: SOURCE_URI: "mongodb://ferretdb:27017/?directConnection=true"
I hope this helps someone.
@Floo33R commented on GitHub (Jul 5, 2025):
After some research, i found out, what i have to put in:
`SOURCE_URI: "mongodb://ferretdb:27017/?directConnection=true"`
I hope this helps someone.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @Floo33R on GitHub (Jul 5, 2025).
Hi,
i have an issue to migrate to the new version. I didn't realize there are new images out and now i am not able to get the new DB up and running.
My
docker-compose.ymllooks like this:When i try to migrate, the
copy_databasecontainer always writes following error:I tried already several different
SOURCE_URIs, but it seems like i can't find the right one.mongodb://ferretdb:27017mongodb://${KOMODO_DB_USERNAME}:${KOMODO_DB_PASSWORD}@ferretdb:27017mongodb://${KOMODO_DB_USERNAME}:${KOMODO_DB_PASSWORD}@ferretdb:27017/?authMechanism=PLAINCan someone help me out here?
@Floo33R commented on GitHub (Jul 5, 2025):
After some research, i found out, what i have to put in:
SOURCE_URI: "mongodb://ferretdb:27017/?directConnection=true"I hope this helps someone.