Add port option
This commit is contained in:
commit
3e3aef20c8
9 changed files with 15 additions and 7 deletions
|
@ -11,4 +11,4 @@ WORKDIR /src/oef/
|
|||
RUN go build -o oef *.go
|
||||
ENTRYPOINT ["/src/oef/oef"]
|
||||
|
||||
EXPOSE 3000
|
||||
EXPOSE 80
|
||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.4.2-11-g359f295-master
|
||||
0.4.3-7-g38a4224-master
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
url: "https://gara.olimpiadi-economiaefinanza.it"
|
||||
port: "80"
|
||||
domain: "olimpiadi-economiaefinanza.it"
|
||||
log_level: 2
|
||||
language: "it"
|
||||
jwt_expire_time: 120
|
||||
|
||||
handlers:
|
||||
allow_session_url_query: true
|
||||
|
||||
keys:
|
||||
cookie_store_key: "2a=UvD!"
|
||||
jwt_signing_key: "ytOC>3,"
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
url: "http://localhost:3000"
|
||||
port: "3000"
|
||||
log_level: 2
|
||||
language: "it"
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ type ConfigT struct {
|
|||
// Domain
|
||||
|
||||
Url string
|
||||
Port string
|
||||
Domain string
|
||||
|
||||
// Language
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
url: "http://localhost:3000"
|
||||
port: "3000"
|
||||
log_level: 2
|
||||
language: "it"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
url: "http://oef_regression_test:3000"
|
||||
url: "http://oef_regression_test"
|
||||
port: "3000"
|
||||
log_level: 2
|
||||
language: "it"
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
url: "http://localhost:3000"
|
||||
port: "3000"
|
||||
log_level: 2
|
||||
language: "it"
|
||||
jwt_expire_time: 60
|
||||
|
|
5
main.go
5
main.go
|
@ -71,8 +71,6 @@ func main() {
|
|||
defer profile.Start().Stop()
|
||||
}
|
||||
|
||||
log.Println("OEF is listening to port 3000...")
|
||||
|
||||
htmlRenderer, err := renderer.NewHTMLRenderer("templates")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
|
@ -116,7 +114,8 @@ func main() {
|
|||
conf.Handlers.PathPatterns = oef_handlers.DefaultPathPatterns
|
||||
conf.Handlers.APIPathPatterns = oef_handlers.DefaultAPIPathPatterns
|
||||
|
||||
if err := http.ListenAndServe(":3000", handlers.LoggingHandler(os.Stdout, oef_handlers.NewHandlers(
|
||||
log.Printf("OEF is listening to port %s...", conf.Port)
|
||||
if err := http.ListenAndServe(":"+conf.Port, handlers.LoggingHandler(os.Stdout, oef_handlers.NewHandlers(
|
||||
conf,
|
||||
renderer,
|
||||
db,
|
||||
|
|
Loading…
Reference in a new issue