关于打包网站动态部署的建议

发布于 2024-10-14 13:06:05 字数 136 浏览 3 评论 0原文

我正在开发一个网站,我想打包并拥有一个下载和安装存档,就像维基媒体引擎一样。

我需要考虑哪些事情?显然我必须让我的index.php 文件检查用户权限、数据库访问权限,然后创建表等...

我可能会忘记什么,或者可能会忽略什么?

I'm working on a website that I would like to package and have a download-and-install archive, much like wikimedia engine.

What are some of the things I need to be considering? Obviously I have to have my index.php file check for user permissions, access to database, then create the tables etc...

What may I be forgetting, or what may be overlooked?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

咽泪装欢 2024-10-21 13:06:05

我认为人们在这些类型的部署中有时会忽视的常见事项包括:

1.消除对特定主机名的依赖。

代码中不应提及任何特定主机名。例如,如果您在开发应用程序时使用了 url“dev.example.com”,并且如果这是在应用程序中硬编码的,则在部署过程中会产生问题。

2.正确且有用的错误处理

不幸的是,您的大多数用户的环境配置与您的环境不完全相同。

例如,MySQL 数据库可能与您系统上的端口、路径等不同。因此,如果应用程序未连接到数据库,它应该尝试帮助诊断原因,然后打印有用的错误消息。 “无法找到 MySQL,请使用端口 XXXX 并确保它在路径 /var/db/mysql 上运行。编辑 XYXYZ.xml 配置文件以指定您的端口和路径”。

这只是众多例子之一。我建议您尝试在一台新机器(例如虚拟机)上进行部署,然后一一解决部署问题,看看是否可以简化它们。

对潜在用户进行走廊可用性测试也可能会有所帮助,因为它会让您发现可能错过的事情。

3. Web 服务器配置

Web 服务器是否嵌入到您的应用程序中? Jetty、Resin 和 Restlet for Java 等容器可以嵌入到应用程序中。我相信这会降低配置开销,因为您可以从应用程序内部控制它,而不是强制您的用户配置 IIS 或 Apache(或您正在使用的任何 Web 服务器),

我不知道 Apache 是否可以嵌入,但是这可能需要研究一下:Mongoose Web Server

4。有用、易于理解的文档

通常,我觉得许多开发人员都忽视了软件开发的这一方面。这并不令人兴奋,但对于产品的采用来说绝对至关重要。

我推荐 YouTube 视频,或者只是一般的视觉效果。我的公司开始使用 YouTube 来演示如何开始使用不同的产品,人们似乎真的很喜欢它。一图胜千言,它们可以快速传达需要用段落来描述的信息。

Common things that I think people sometimes overlook in these types of deployments include the following:

1. Eliminating the Dependency on a Specific Hostname.

There should be no mention in the code of any specific hostname. For instance, if you used the url "dev.example.com" when developing the application, and if this is hard-coded in the application, it would create problems during the deployment.

2. Proper and Helpful Error Handling

Unfortunately, most of your users will not have their environment configured exactly as yours.

For example, MySQL database may not be running on the same port, path, etc that it is on your system. Therefore, if the application doesn't connect to the database, it should try to help diagnose why and then print a helpful error message. "MySQL cannot be located, please use port XXXX and make sure it's running at path /var/db/mysql. Edit the XYXYZ.xml configuration file to specify your port and path".

This is just one of many examples. I suggest you try a deployment on a fresh machine -- such as a Virtual Machine -- and then go through the deployment issues one by one and see if you can simplify them.

A hallway usability test with a potential user may also be helpful as it will open your eyes to things you may have missed.

3. Web Server Configuration

Is the web server embedded in your application? Containers like Jetty, Resin, and Restlets for Java can be embedded inside the application. I believe this lowers the configuration overhead as you could control this from within your application much easier than having to force your user to configure IIS or Apache (or whatever web server you are using)

I am not aware if Apache can be embedded, but this may be something to look into: Mongoose Web Server

4. Useful, Easy to Understand Documentation

Oftentimes, I feel many developers overlook this aspect of software development. It's not exciting, but it's absolutely critical for adoption of your product.

I recommend YouTube videos, or just visuals in general. My company started using YouTube as a way to demonstrate how to get started using different products, and people really seem to like it. A picture speaks a thousand words, and they can quickly convey a message that would otherwise take paragraphs to describe.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文