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"
|
config = require "lapis.config"
|
||||||
|
|
||||||
ffi = actualrequire("ffi")
|
|
||||||
ffi.cdef [[
|
|
||||||
char *getenv(const char *name)
|
|
||||||
]]
|
|
||||||
|
|
||||||
getenv = (name) ->
|
|
||||||
ffi.string ffi.C.getenv name
|
|
||||||
|
|
||||||
config "development", ->
|
config "development", ->
|
||||||
port 8080
|
port 8080
|
||||||
|
|
||||||
|
@ -23,8 +15,8 @@ config "docker", ->
|
||||||
|
|
||||||
postgres ->
|
postgres ->
|
||||||
backend "pgmoon"
|
backend "pgmoon"
|
||||||
port getenv "POSTGRESQL_PORT_5432_TCP_PORT"
|
port tostring os.getenv "POSTGRESQL_PORT_5432_TCP_PORT"
|
||||||
host getenv "POSTGRESQL_PORT_5432_TCP_ADDR"
|
host tostring os.getenv "POSTGRESQL_PORT_5432_TCP_ADDR"
|
||||||
user getenv "DB_USER"
|
user tostring os.getenv "DB_USER"
|
||||||
password getenv "DB_PASS"
|
password tostring os.getenv "DB_PASS"
|
||||||
database getenv "DB_NAME"
|
database tostring os.getenv "DB_NAME"
|
||||||
|
|
Loading…
Reference in New Issue