update config
This commit is contained in:
parent
830fd195dc
commit
f0b56405fe
18
config.moon
18
config.moon
|
@ -1,13 +1,5 @@
|
|||
config = require "lapis.config"
|
||||
|
||||
ffi = actualrequire("ffi")
|
||||
ffi.cdef [[
|
||||
char *getenv(const char *name)
|
||||
]]
|
||||
|
||||
getenv = (name) ->
|
||||
ffi.string ffi.C.getenv name
|
||||
|
||||
config "development", ->
|
||||
port 8080
|
||||
|
||||
|
@ -23,8 +15,8 @@ config "docker", ->
|
|||
|
||||
postgres ->
|
||||
backend "pgmoon"
|
||||
port getenv "POSTGRESQL_PORT_5432_TCP_PORT"
|
||||
host getenv "POSTGRESQL_PORT_5432_TCP_ADDR"
|
||||
user getenv "DB_USER"
|
||||
password getenv "DB_PASS"
|
||||
database getenv "DB_NAME"
|
||||
port tostring os.getenv "POSTGRESQL_PORT_5432_TCP_PORT"
|
||||
host tostring os.getenv "POSTGRESQL_PORT_5432_TCP_ADDR"
|
||||
user tostring os.getenv "DB_USER"
|
||||
password tostring os.getenv "DB_PASS"
|
||||
database tostring os.getenv "DB_NAME"
|
||||
|
|
Loading…
Reference in New Issue