membphis commented on a change in pull request #693:
URL: https://github.com/apache/apisix-dashboard/pull/693#discussion_r517796062
##########
File path: api/Dockerfile
##########
@@ -17,45 +17,34 @@
FROM golang:1.13.8 AS build-env
-WORKDIR /go/src/github.com/apisix/manager-api
+RUN mkdir -p /usr/local/apisix-dashboard/api
Review comment:
one PR for one thing, I think we can fix this in new PR
##########
File path: Makefile
##########
@@ -49,5 +49,5 @@ golang-lint: ## Run the golangci-lint application (install if
not found)
### api-test: Run the tests of manager-api
.PHONY: api-test
api-test:
- cd api/ && go test -v -race -cover -coverprofile=coverage.txt
-covermode=atomic ./...
+ cd api/ && APISIX_API_WORKDIR=$$PWD go test -v -race -cover
-coverprofile=coverage.txt -covermode=atomic ./...
Review comment:
I am confused with `./...`, can you explain this? @nic-chen
##########
File path: api/internal/handler/route/route.go
##########
@@ -175,7 +175,7 @@ func generateLuaCode(script map[string]interface{})
(string, error) {
}
cmd := exec.Command("sh", "-c",
- "cd "+conf.DagLibPath+" && lua cli.lua "+
+ "cd "+conf.WorkDir+"/dag-to-lua && lua cli.lua "+
Review comment:
seems wrong.
we should use `conf.dag_lib_path`, all right?
##########
File path: api/conf/conf.yaml
##########
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# PLEASE DO NOT UPDATE THIS FILE!
+# If you want to set the specified configuration value, you can set the new
+# value in the conf/config.yaml file.
+#
+
+conf:
+ listen:
+ host: 127.0.0.1
Review comment:
do we support `*` here?
##########
File path: api/conf/conf.yaml
##########
@@ -0,0 +1,37 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# PLEASE DO NOT UPDATE THIS FILE!
+# If you want to set the specified configuration value, you can set the new
+# value in the conf/config.yaml file.
+#
+
+conf:
+ listen:
+ host: 127.0.0.1
+ port: 8080
+ dag_lib_path: ''
Review comment:
`''` empty string? is it a valid path?
##########
File path: api/Dockerfile
##########
@@ -17,45 +17,34 @@
FROM golang:1.13.8 AS build-env
-WORKDIR /go/src/github.com/apisix/manager-api
+RUN mkdir -p /usr/local/apisix-dashboard/api
+
+WORKDIR /usr/local/apisix-dashboard/api
+
COPY . .
-RUN mkdir -p /go/manager-api \
- && mkdir -p /go/manager-api/build-tools \
+
+RUN mkdir -p ../output/conf \
+ && cp ./conf/* ../output/conf
+
+RUN wget https://github.com/api7/dag-to-lua/archive/v1.1.tar.gz -O
/tmp/v1.1.tar.gz \
Review comment:
change it from `/tmp/v1.1.tar.gz` to `/tmp/dag-to-lua.tar.gz`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]