openim-docker
openim-docker copied to clipboard
[DOC]: How to Modify Configuration
To modify the configuration by setting environment variables, follow these rules:
-
For modifying the openim-serve configuration file: Set the environment variable using the pattern
IMENV_filename_variable=${value}
. Ensure to replace any hyphens in the filename with underscores. -
For modifying the openim-chat configuration file: Use the pattern
CHATENV_filename_variable=${value}
. As with the server configuration, replace hyphens in the filename with underscores.
Examples: in docker-compose.yaml
- To change the
prometheus.grafanaURL
in theopenim-api.yml
file, set the environment variable as:IMENV_OPENIM_API_PROMETHEUS_GRAFANAURL=${value}
- To modify the
api.listenIP
in thechat-api-admin.yml
file, the environment variable should be:CHATENV_CHAT_API_ADMIN_API_LISTENIP=${value}
These guidelines ensure that you correctly set the environment variables needed to modify specific configuration settings.
openim-server: image: ${OPENIM_SERVER_IMAGE} container_name: openim-server ports: - "${OPENIM_MSG_GATEWAY_PORT}:10001" - "${OPENIM_API_PORT}:10002" healthcheck: test: [ "CMD", "sh", "-c", "mage check" ] interval: 5s timeout: 60s retries: 10 environment: - IMENV_MONGODB_ADDRESS=${MONGO_ADDRESS} - IMENV_MONGODB_USERNAME=${MONGO_USERNAME} - IMENV_MONGODB_PASSWORD=${MONGO_PASSWORD} - IMENV_KAFKA_ADDRESS=${KAFKA_ADDRESS} - IMENV_ZOOKEEPER_ADDRESS=${ZOOKEEPER_ADDRESS} - IMENV_REDIS_ADDRESS=${REDIS_ADDRESS} - IMENV_REDIS_PASSWORD=${REDIS_PASSWORD} - IMENV_MINIO_INTERNALADDRESS=${MINIO_INTERNAL_ADDRESS} - IMENV_MINIO_EXTERNALADDRESS=${MINIO_EXTERNAL_ADDRESS} - IMENV_MINIO_ACCESSKEYID=${MINIO_ACCESS_KEY_ID} - IMENV_MINIO_SECRETACCESSKEY=${MINIO_SECRET_ACCESS_KEY} - IMENV_SHARE_SECRET=${OPENIM_SECRET} - IMENV_LOG_ISSTDOUT=${LOG_IS_STDOUT} - IMENV_LOG_REMAINLOGLEVEL=${LOG_LEVEL} - IMENV_OPENIM_API_PROMETHEUS_GRAFANAURL=${GRAFANA_URL} restart: always networks: - openim
Reference for configuration files:
https://github.com/openimsdk/open-im-server/tree/main/config https://github.com/openimsdk/chat/tree/main/config
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.
Totice:When adding environment variables, do not include quotes.
Hi team,
I’m using OpenIM server with Docker and would like to integrate Firebase Cloud Messaging (FCM) for push notifications. I’ve mapped the Firebase JSON file into the container, but I’m unsure of the next steps. Could you guide me on how to configure FCM within the OpenIM server?
Thank you!
Totice:When adding environment variables, do not include quotes.
不太明白, 我该什么时候加引号,什么时候不加。 我看到 config.yaml 部分配置有引号部分没有
Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑🤝🧑👫🧑🏿🤝🧑🏻👩🏾🤝👨🏿👬🏿
Totice: ** When adding environment variables, do not include quotes. **
I don't quite understand, when should I add the quotation and when did I not add it. I see the config.yaml part of the configuration of the quotation section.