openim-docker icon indicating copy to clipboard operation
openim-docker copied to clipboard

[DOC]: How to Modify Configuration

Open skiffer-git opened this issue 10 months ago • 5 comments

skiffer-git avatar Apr 27 '24 03:04 skiffer-git

To modify the configuration by setting environment variables, follow these rules:

  1. 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.

  2. 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 the openim-api.yml file, set the environment variable as:
    IMENV_OPENIM_API_PROMETHEUS_GRAFANAURL=${value}
    
  • To modify the api.listenIP in the chat-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.

skiffer-git avatar Apr 27 '24 03:04 skiffer-git

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

skiffer-git avatar May 08 '24 04:05 skiffer-git

Reference for configuration files:

https://github.com/openimsdk/open-im-server/tree/main/config https://github.com/openimsdk/chat/tree/main/config

skiffer-git avatar Jun 17 '24 10:06 skiffer-git

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.

kubbot avatar Aug 17 '24 08:08 kubbot

Totice:When adding environment variables, do not include quotes.

icey-yu avatar Aug 19 '24 10:08 icey-yu

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!

buiphukhuyen avatar Oct 17 '24 13:10 buiphukhuyen

Totice:When adding environment variables, do not include quotes.

不太明白, 我该什么时候加引号,什么时候不加。 我看到 config.yaml 部分配置有引号部分没有

liony823 avatar Jan 25 '25 09:01 liony823

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.

OpenIM-Robot avatar Jan 25 '25 09:01 OpenIM-Robot