Initial commit: exactly what I got from stack new lebd yesod-mysql, with no changes
This commit is contained in:
commit
27b465180a
43 changed files with 9092 additions and 0 deletions
BIN
config/favicon.ico
Normal file
BIN
config/favicon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.3 KiB |
70
config/keter.yml
Normal file
70
config/keter.yml
Normal file
|
@ -0,0 +1,70 @@
|
|||
# After you've edited this file, remove the following line to allow
|
||||
# `yesod keter` to build your bundle.
|
||||
user-edited: false
|
||||
|
||||
# A Keter app is composed of 1 or more stanzas. The main stanza will define our
|
||||
# web application. See the Keter documentation for more information on
|
||||
# available stanzas.
|
||||
stanzas:
|
||||
|
||||
# Your Yesod application.
|
||||
- type: webapp
|
||||
|
||||
# Name of your executable. You are unlikely to need to change this.
|
||||
# Note that all file paths are relative to the keter.yml file.
|
||||
#
|
||||
# The path given is for Stack projects. If you're still using cabal, change
|
||||
# to
|
||||
# exec: ../dist/build/lebd/lebd
|
||||
exec: ../dist/bin/lebd
|
||||
|
||||
# Command line options passed to your application.
|
||||
args: []
|
||||
|
||||
hosts:
|
||||
# You can specify one or more hostnames for your application to respond
|
||||
# to. The primary hostname will be used for generating your application
|
||||
# root.
|
||||
- www.lebd.com
|
||||
|
||||
# Enable to force Keter to redirect to https
|
||||
# Can be added to any stanza
|
||||
requires-secure: false
|
||||
|
||||
# Static files.
|
||||
- type: static-files
|
||||
hosts:
|
||||
- static.lebd.com
|
||||
root: ../static
|
||||
|
||||
# Uncomment to turn on directory listings.
|
||||
# directory-listing: true
|
||||
|
||||
# Redirect plain domain name to www.
|
||||
- type: redirect
|
||||
|
||||
hosts:
|
||||
- lebd.com
|
||||
actions:
|
||||
- host: www.lebd.com
|
||||
# secure: false
|
||||
# port: 80
|
||||
|
||||
# Uncomment to switch to a non-permanent redirect.
|
||||
# status: 303
|
||||
|
||||
# Use the following to automatically copy your bundle upon creation via `yesod
|
||||
# keter`. Uses `scp` internally, so you can set it to a remote destination
|
||||
# copy-to: user@host:/opt/keter/incoming/
|
||||
|
||||
# You can pass arguments to `scp` used above. This example limits bandwidth to
|
||||
# 1024 Kbit/s and uses port 2222 instead of the default 22
|
||||
# copy-to-args:
|
||||
# - "-l 1024"
|
||||
# - "-P 2222"
|
||||
|
||||
# If you would like to have Keter automatically create a PostgreSQL database
|
||||
# and set appropriate environment variables for it to be discovered, uncomment
|
||||
# the following line.
|
||||
# plugins:
|
||||
# postgres: true
|
17
config/models
Normal file
17
config/models
Normal file
|
@ -0,0 +1,17 @@
|
|||
User
|
||||
ident Text sqltype=varchar(255)
|
||||
password Text Maybe sqltype=varchar(255) default=NULL
|
||||
UniqueUser ident
|
||||
deriving Typeable
|
||||
Email
|
||||
email Text sqltype=varchar(255)
|
||||
userId UserId Maybe sqltype=varchar(255) default=NULL
|
||||
verkey Text Maybe sqltype=varchar(255) default=NULL
|
||||
UniqueEmail email
|
||||
Comment json -- Adding "json" causes ToJSON and FromJSON instances to be derived.
|
||||
message Text sqltype=varchar(255)
|
||||
userId UserId Maybe sqltype=varchar(255) default=NULL
|
||||
deriving Eq
|
||||
deriving Show
|
||||
|
||||
-- By default this file is used in Model.hs (which is imported by Foundation.hs)
|
1
config/robots.txt
Normal file
1
config/robots.txt
Normal file
|
@ -0,0 +1 @@
|
|||
User-agent: *
|
11
config/routes
Normal file
11
config/routes
Normal file
|
@ -0,0 +1,11 @@
|
|||
/static StaticR Static appStatic
|
||||
/auth AuthR Auth getAuth
|
||||
|
||||
/favicon.ico FaviconR GET
|
||||
/robots.txt RobotsR GET
|
||||
|
||||
/ HomeR GET POST
|
||||
|
||||
/comments CommentR POST
|
||||
|
||||
/profile ProfileR GET
|
36
config/settings.yml
Normal file
36
config/settings.yml
Normal file
|
@ -0,0 +1,36 @@
|
|||
# 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:3000" # 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.
|
||||
#
|
||||
# detailed-logging: false
|
||||
# should-log-all: false
|
||||
# reload-templates: false
|
||||
# mutable-static: false
|
||||
# skip-combining: false
|
||||
# auth-dummy-login : 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:lebd"
|
||||
password: "_env:MYSQL_PASSWORD:lebd"
|
||||
host: "_env:MYSQL_HOST:localhost"
|
||||
port: "_env:MYSQL_PORT:5432"
|
||||
# See config/test-settings.yml for an override during tests
|
||||
database: "_env:MYSQL_DATABASE:lebd"
|
||||
poolsize: "_env:MYSQL_POOLSIZE:10"
|
||||
|
||||
copyright: Insert copyright statement here
|
||||
#analytics: UA-YOURCODE
|
11
config/test-settings.yml
Normal file
11
config/test-settings.yml
Normal file
|
@ -0,0 +1,11 @@
|
|||
database:
|
||||
# NOTE: By design, this setting prevents the MYSQL_DATABASE environment variable
|
||||
# from affecting test runs, so that we don't accidentally affect the
|
||||
# production database during testing. If you're not concerned about that and
|
||||
# would like to have environment variable overrides, you could instead use
|
||||
# something like:
|
||||
#
|
||||
# database: "_env:MYSQL_DATABASE:lebd_test"
|
||||
database: lebd_test
|
||||
|
||||
auth-dummy-login: true
|
Loading…
Add table
Add a link
Reference in a new issue