mirror of
https://github.com/pagefaultgames/rogueserver.git
synced 2025-04-03 03:27:13 +08:00
update to use environment variables
This commit is contained in:
parent
58947d1bcb
commit
99723edd75
@ -10,7 +10,6 @@ COPY . ./
|
|||||||
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /docker-gs-ping
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /docker-gs-ping
|
||||||
|
|
||||||
|
|
||||||
EXPOSE 8001
|
EXPOSE 8001
|
||||||
|
|
||||||
CMD ["/docker-gs-ping"]
|
CMD ["/docker-gs-ping"]
|
@ -31,16 +31,17 @@ import (
|
|||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
// flag stuff
|
// flag stuff
|
||||||
debug := flag.Bool("debug", false, "use debug mode")
|
debug := os.Getenv("debug")
|
||||||
|
|
||||||
proto := flag.String("proto", "tcp", "protocol for api to use (tcp, unix)")
|
proto := "tcp"
|
||||||
addr := flag.String("addr", "0.0.0.0:8001", "network address for api to listen on")
|
addr := "0.0.0.0:8001"
|
||||||
|
|
||||||
dbuser := flag.String("dbuser", "pokerogue", "database username")
|
|
||||||
dbpass := flag.String("dbpass", "pokerogue", "database password")
|
dbuser := os.Getenv("dbuser")
|
||||||
dbproto := flag.String("dbproto", "tcp", "protocol for database connection")
|
dbpass := os.Getenv("dbpass")
|
||||||
dbaddr := flag.String("dbaddr", "localhost", "database address")
|
dbproto := "tcp"
|
||||||
dbname := flag.String("dbname", "pokeroguedb", "database name")
|
dbaddr := os.Getenv("dbaddr")
|
||||||
|
dbname := os.Getenv("dbname")
|
||||||
|
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user