1

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
FtheBuilder
  • 1,410
  • 12
  • 19
  • is keter running? What do the log files say? – Random Dev May 17 '16 at 03:58
  • I copied an updated version of my project to `keter/incoming` to know if any log would change, but neither `log/keter/current.log` nor `log/app-MyProject/current.log` changed. – FtheBuilder May 17 '16 at 13:54
  • well what does the log say and is keter running? – Random Dev May 17 '16 at 14:12
  • ketter is not running as a service. When I try the keter command it shows: `keter: Usage: keter `. nginx is installed and running. – FtheBuilder May 17 '16 at 14:27
  • well if it is not running it will not process the files – Random Dev May 17 '16 at 14:40
  • I was able to make keter run, but I am getting this in my log: `Error occured when launching bundle Fastwork: Codec.Compression.Zlib: premature end of compressed data stream` – FtheBuilder May 18 '16 at 00:20
  • There is a Welcome keter saying: `The hostname you have provided, localhost, is not recognized.` I think there is something missing... – FtheBuilder May 18 '16 at 00:44
  • the first one looks like your archive is corrupted (I would suggest trying `yesod keter` instead of packing it yourself) - for the second one we would need to see your settings/config file but you can try `127.0.0.1` or your actual hostname instead – Random Dev May 18 '16 at 03:51
  • there is a good intro here: https://pbrisbin.com/posts/yesod_deployments_with_keter/ - maybe it helps you – Random Dev May 18 '16 at 03:55

0 Answers0