Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOC]: How to Modify Configuration #136

Open
skiffer-git opened this issue Apr 27, 2024 · 3 comments
Open

[DOC]: How to Modify Configuration #136

skiffer-git opened this issue Apr 27, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@skiffer-git
Copy link
Member

No description provided.

@skiffer-git skiffer-git added the documentation Improvements or additions to documentation label Apr 27, 2024
@skiffer-git
Copy link
Member Author

skiffer-git commented Apr 27, 2024

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
Copy link
Member Author

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
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant