bzp2010 commented on a change in pull request #2010: URL: https://github.com/apache/apisix-dashboard/pull/2010#discussion_r683119168
########## File path: api/test/docker/manager-api-conf.yaml ########## @@ -36,7 +36,9 @@ authentication: # if it's default value, when `manager api` start, it will generate a random string to replace it. expire_time: 3600 # jwt token expire time, in second users: # yamllint enable rule:comments-indentation - - username: admin # username and password for login `manager api` - password: admin - - username: user - password: user + - type: local + username: admin # username and password for login `manager api` + password: $2a$10$NjjlIhuj4O6foZhWw96H0uXZQl0na8qg.BSbf/ASwurchFhUW0fzC Review comment: #### Update I have removed the password hash. ########## File path: Dockerfile ########## @@ -16,13 +16,12 @@ # FROM alpine:latest as pre-build -ARG APISIX_DASHBOARD_VERSION=master +ARG APISIX_DASHBOARD_GITHASH=00000000 + +ADD . /usr/local/apisix-dashboard RUN set -x \ - && apk add --no-cache --virtual .builddeps git \ - && git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_VERSION} /usr/local/apisix-dashboard \ - && cd /usr/local/apisix-dashboard && git clean -Xdf \ - && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash + && echo ${APISIX_DASHBOARD_GITHASH:0:8} > ./.githash Review comment: #### Changes - Modify dockerfile to compile with local branch code. - Instead of getting githash from clone's code, pass in githash variable through GitHub actions. ########## File path: Dockerfile ########## @@ -16,13 +16,12 @@ # FROM alpine:latest as pre-build -ARG APISIX_DASHBOARD_VERSION=master +ARG APISIX_DASHBOARD_GITHASH=00000000 + +ADD . /usr/local/apisix-dashboard RUN set -x \ - && apk add --no-cache --virtual .builddeps git \ - && git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_VERSION} /usr/local/apisix-dashboard \ - && cd /usr/local/apisix-dashboard && git clean -Xdf \ - && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash + && echo ${APISIX_DASHBOARD_GITHASH:0:8} > ./.githash Review comment: > should we also update the dockerfile in repo apisix-docker? In fact, I don't think we need to update the `Dockerfile`. The code in that repo is mainly used to compile and upload to the registry, while the code in the current warehouse is more used for development purposes. What do you think? Thx. ########## File path: Dockerfile ########## @@ -16,13 +16,12 @@ # FROM alpine:latest as pre-build -ARG APISIX_DASHBOARD_VERSION=master +ARG APISIX_DASHBOARD_GITHASH=00000000 + +ADD . /usr/local/apisix-dashboard RUN set -x \ - && apk add --no-cache --virtual .builddeps git \ - && git clone https://github.com/apache/apisix-dashboard.git -b ${APISIX_DASHBOARD_VERSION} /usr/local/apisix-dashboard \ - && cd /usr/local/apisix-dashboard && git clean -Xdf \ - && rm -f ./.githash && git log --pretty=format:"%h" -1 > ./.githash + && echo ${APISIX_DASHBOARD_GITHASH:0:8} > ./.githash Review comment: reply to @nic-chen, hi. > should we also update the dockerfile in repo apisix-docker? In fact, I don't think we need to update the `Dockerfile`. The code in that repo is mainly used to compile and upload to the registry, while the code in the current warehouse is more used for development purposes. What do you think? Thx. -- 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. To unsubscribe, e-mail: notifications-unsubscr...@apisix.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org