mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-24 17:28:31 +02:00
copied default config into docker image, fixed ls-routes
This commit is contained in:
@@ -43,6 +43,9 @@ COPY --from=builder /app /app
|
|||||||
# copy schema directory
|
# copy schema directory
|
||||||
COPY schema/ /app/schema/
|
COPY schema/ /app/schema/
|
||||||
|
|
||||||
|
# copy example config
|
||||||
|
COPY config.example.yml /app/config/config.yml
|
||||||
|
|
||||||
# copy certs
|
# copy certs
|
||||||
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
|
COPY --from=builder /etc/ssl/certs /etc/ssl/certs
|
||||||
|
|
||||||
|
|||||||
@@ -48,11 +48,10 @@ func main() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("failed to connect to api server: %s", err)
|
log.Printf("failed to connect to api server: %s", err)
|
||||||
log.Printf("falling back to config file")
|
log.Printf("falling back to config file")
|
||||||
printJSON(config.RoutesByAlias())
|
|
||||||
} else {
|
} else {
|
||||||
printJSON(routes)
|
printJSON(routes)
|
||||||
|
return
|
||||||
}
|
}
|
||||||
return
|
|
||||||
case common.CommandDebugListMTrace:
|
case common.CommandDebugListMTrace:
|
||||||
trace, err := query.ListMiddlewareTraces()
|
trace, err := query.ListMiddlewareTraces()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
@@ -95,6 +94,10 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch args.Command {
|
switch args.Command {
|
||||||
|
case common.CommandListRoutes:
|
||||||
|
cfg.StartProxyProviders()
|
||||||
|
printJSON(config.RoutesByAlias())
|
||||||
|
return
|
||||||
case common.CommandListConfigs:
|
case common.CommandListConfigs:
|
||||||
printJSON(config.Value())
|
printJSON(config.Value())
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ type (
|
|||||||
ContainerID string `json:"container_id" yaml:"-"`
|
ContainerID string `json:"container_id" yaml:"-"`
|
||||||
ImageName string `json:"image_name" yaml:"-"`
|
ImageName string `json:"image_name" yaml:"-"`
|
||||||
|
|
||||||
Labels map[string]string `json:"labels" yaml:"-"`
|
Labels map[string]string `json:"-" yaml:"-"`
|
||||||
|
|
||||||
PublicPortMapping PortMapping `json:"public_ports" yaml:"-"` // non-zero publicPort:types.Port
|
PublicPortMapping PortMapping `json:"public_ports" yaml:"-"` // non-zero publicPort:types.Port
|
||||||
PrivatePortMapping PortMapping `json:"private_ports" yaml:"-"` // privatePort:types.Port
|
PrivatePortMapping PortMapping `json:"private_ports" yaml:"-"` // privatePort:types.Port
|
||||||
|
|||||||
Reference in New Issue
Block a user