config.php.j2 1.9 KB

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