Deploying Yesod project using keter at localhost

242 Views Asked by At

I installed Keter and compiled my project using stack exec -- yesod keter, and then I copied the compiled keter file to /opt/keter/incoming. this is my config/keter.yml file:

exec: ../dist/build/MyProject/MyProject
host: localhost

and this is my 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

Is something wrong or missing? I tried to access localhost at port 80 but it wasn't successful.

I installed keter using a script:

wget -O - https://raw.githubusercontent.com/snoyberg/keter/master/setup-keter.sh | bash
0

There are 0 best solutions below