Help! How to initialize configuration using environment variables
-
I have seen the environment variables for reading the project, but I still need to initialize the project using these environment variables.
const envConfMap = { CONFIG: 'config', NODEBB_CONFIG: 'config', NODEBB_URL: 'url', NODEBB_PORT: 'port', NODEBB_ADMIN_USERNAME: 'admin:username', NODEBB_ADMIN_PASSWORD: 'admin:password', NODEBB_ADMIN_EMAIL: 'admin:email', NODEBB_DB: 'database', NODEBB_DB_HOST: 'host', NODEBB_DB_PORT: 'port', NODEBB_DB_USER: 'username', NODEBB_DB_PASSWORD: 'password', NODEBB_DB_NAME: 'database', NODEBB_DB_SSL: 'ssl', };
What is the docker-composer.yml used for startup
networks: 1panel-network: external: true services: nodebb: container_name: ${CONTAINER_NAME} deploy: resources: limits: cpus: ${CPUS} memory: ${MEMORY_LIMIT} environment: - TZ=Asia/Shanghai - NODEBB_PORT=4567 - NODEBB_URL=http://127.0.0.1:4567 - NODEBB_ADMIN_EMAIL="[email protected]" - NODEBB_ADMIN_PASSWORD="xxxxxxx" - NODEBB_ADMIN_USERNAME="admin" - NODEBB_DB="postgres" - NODEBB_DB_HOST="127.0.0.1" - NODEBB_DB_NAME="nodebb" - NODEBB_DB_PASSWORD="xxxxxxx" - NODEBB_DB_PORT=5432 - NODEBB_DB_USER="nodebb" image: ghcr.io/nodebb/nodebb:3.12.2 labels: createdBy: Apps networks: - 1panel-network ports: - 4567:4567 restart: always volumes: - ${NODEBB_ROOT_PATH}/node_modules:/usr/src/app/node_modules - ${NODEBB_ROOT_PATH}/build:/usr/src/app/build - ${NODEBB_ROOT_PATH}/uploads:/usr/src/app/public/uploads - ${NODEBB_ROOT_PATH}/config:/opt/config - ${NODEBB_ROOT_PATH}/setup.json:/usr/src/app/setup.json
What I hope for is to achieve unmanned installation
Copyright © 2025 NodeBB | Contributors