2
0

config.php.j2 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. #域名设置
  3. define("GRPC_WEB_SERVER","{{ app_grpc_web_server}}");
  4. define("ASSETS_SERVER","{{ app_assets_server }}");
  5. define("DOCUMENTS_SERVER","{{ app_documents_server }}");
  6. define('APP_KEY','{{ app_secret_key }}');
  7. define('APP_ENV','{{ app_env }}');
  8. define('CORS_ALLOWED_ORIGINS', '{{ app_cors_allowed_origins }}');
  9. define('DASHBOARD_BASE_PATH', "{{ app_dashboard_base_path }}");
  10. /*
  11. 电子邮件设置
  12. PHPMailer
  13. */
  14. define("Email", [
  15. "Host"=>"{{ app_smtp_host }}",//Set the SMTP server to send through
  16. "SMTPAuth"=>true,//Enable SMTP authentication
  17. "Username"=>'{{ app_smtp_user }}',//SMTP username
  18. "Password"=>'{{ app_smtp_password }}',//SMTP password
  19. "Port"=>{{ app_smtp_port }},//TCP port to connect to 465; use 587 if you have set `SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS`
  20. "From"=>"{{ app_smtp_user }}",
  21. "Sender"=>"webmaster"
  22. ]);
  23. /*
  24. 数据库设置
  25. */
  26. define("Database",[
  27. "type"=>"pgsql",
  28. "server"=>"{{ app_postgresql_host }}",
  29. "port"=>{{ app_postgresql_port }},
  30. "name"=>"{{ app_postgresql_dbname }}",
  31. "sslmode" => "disable",
  32. "user" => "{{ app_postgresql_user }}",
  33. "password" => "{{ app_postgresql_password }}"
  34. ]);
  35. /*
  36. Redis 设置,
  37. */
  38. define("Redis",[
  39. "host" => "{{ app_redis_host }}",
  40. "port" => {{ app_redis_port }},
  41. "password" => "",
  42. "prefix"=>"{{ app_domain }}://v1/"
  43. ]);
  44. # 雪花id
  45. define("SnowFlake",[
  46. "DatacenterId"=>{{ app_snowflake_data_center_id }},
  47. "WorkerId"=>{{ app_snowflake_worker_id }}
  48. ]);
  49. #目录设置,不能更改
  50. require_once __DIR__."/config.dir.php";
  51. /*
  52. 数据表
  53. */
  54. #表设置,此行不能更改
  55. require_once __DIR__."/config.table.php";
  56. ?>