部署Yesod网络应用程序 [英] Deploying Yesod web app

查看:114
本文介绍了部署Yesod网络应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的Yesod网络应用程序。
我可以遵循 http://www.yesodweb.com/page/quickstart,并检查 stack exec - Yesod devel 正常工作。



我使用的服务器(Amazon EC2)只有一千兆字节的内存,所以我无法编译Yesod网络。我用我的本地机器来构建。他们都使用Ubuntu 14.04。



http://www.yesodweb.com/book/deploying-your-webapp ,我需要三个组件部署到其他机器。


  1. 您的可执行文件。

  2. 配置文件夹。

  3. 静态文件夹

我很容易找到config / static文件夹,但我不确定在哪里可以找到可执行文件S)。除此之外,如何运行exeuctable而不使用 stack exec - Yesod devel

解决方案

stack build 命令给我提示:

  my-project-0.0.0:install 

/home/a/my-project/.stack-work/install/x86_64-linux/lts-3.13/7.10.2/中安装库lib / x86_64-linux-ghc-7.10.2 / my-project-0.0.0-Khn8lQEgR1HARzYGStlvPe

/home/a/my-project/.stack-work/install中安装可执行文件/x86_64-linux/lts-3.13/7.10.2/bin
注册my-project-0.0.0 ...

可执行文件位于 /home/a/my-project/.stack-work/install/x86_64-linux/lts-3.13/7.10.2/bin 。我可以复制〜/ deployment目录下的文件(可执行文件,静态和配置文件)来检查Yesod是否正常工作。


I have a simple Yesod web app. I could follow the instruction in http://www.yesodweb.com/page/quickstart, and checked stack exec -- Yesod devel is working fine.

The server that I use (Amazon EC2) has only one gigabyte of memory, so I can't compile the Yesod web. I used my local machine to build. Both of them use Ubuntu 14.04.

From http://www.yesodweb.com/book/deploying-your-webapp, I need three components to deploy to other machine.

  1. Your executable.
  2. The config folder.
  3. The static folder.

I find easily the config/static folder, but I'm not exactly sure where to find the executable(s). Other than that, how to run the exeuctable without using stack exec -- Yesod devel?

解决方案

The stack build command gives me the hints:

my-project-0.0.0: install
Installing library in
/home/a/my-project/.stack-work/install/x86_64-linux/lts-3.13/7.10.2/lib/x86_64-linux-ghc-7.10.2/my-project-0.0.0-Khn8lQEgR1HARzYGStlvPe
Installing executable(s) in
/home/a/my-project/.stack-work/install/x86_64-linux/lts-3.13/7.10.2/bin
Registering my-project-0.0.0...

The executable is located in /home/a/my-project/.stack-work/install/x86_64-linux/lts-3.13/7.10.2/bin. I could copy the files (executable, static, and config) in ~/deployment directory to check the Yesod works fine.

这篇关于部署Yesod网络应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆