我安装了Keter
并使用stack exec -- yesod keter
编译了我的项目,然后将已编译的keter
文件复制到/opt/keter/incoming
。这是我的config/keter.yml
文件:
exec: ../dist/build/MyProject/MyProject
host: localhost
这是我的config/settings.yml
:
# Values formatted like "_env:ENV_VAR_NAME:default_value" can be overridden by the specified environment variable.
# See https://github.com/yesodweb/yesod/wiki/Configuration#overriding-configuration-values-with-environment-variables
static-dir: "_env:STATIC_DIR:static"
host: "_env:HOST:*4" # any IPv4 host
port: "_env:PORT:80" # NB: The port `yesod devel` uses is distinct from this value. Set the `yesod devel` port from the command line.
ip-from-header: "_env:IP_FROM_HEADER:false"
# Default behavior: determine the application root from the request headers.
# Uncomment to set an explicit approot
#approot: "_env:APPROOT:http://localhost:3000"
# Optional values with the following production defaults.
# In development, they default to the inverse.
#
# development: false
# detailed-logging: false
# should-log-all: false
# reload-templates: false
# mutable-static: false
# skip-combining: false
# NB: If you need a numeric value (e.g. 123) to parse as a String, wrap it in single quotes (e.g. "_env:PGPASS:'123'")
# See https://github.com/yesodweb/yesod/wiki/Configuration#parsing-numeric-values-as-strings
database:
user: "_env:MYSQL_USER:root"
password: "_env:MYSQL_PASSWORD:#123"
host: "_env:MYSQL_HOST:localhost"
port: "_env:MYSQL_PORT:3306"
# See config/test-settings.yml for an override during tests
database: "_env:MYSQL_DATABASE:mydatabase"
poolsize: "_env:MYSQL_POOLSIZE:2"
copyright: Insert copyright statement here
#analytics: UA-YOURCODE
有什么不对或丢失吗?我尝试在端口80访问localhost
但是没有成功。
我使用脚本安装了keter:
wget -O - https://raw.githubusercontent.com/snoyberg/keter/master/setup-keter.sh | bash