Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ package-dashboard-rpm:
--iteration $(iteration) \
--description 'Apache APISIX Dashboard is designed to make it as easy as possible for users to operate Apache APISIX through a frontend interface.' \
--license "ASL 2.0" \
--after-install ${PWD}/deps/after-install.sh \
-C ${PWD}/build/rpm/output/apisix/dashboard/ \
-p ${PWD}/output/ \
--url 'https://github.com/apache/apisix-dashboard'
Expand Down
3 changes: 3 additions & 0 deletions deps/after-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
systemctl daemon-reload \
&& systemctl enable manager-api.service \
&& chown -R nobody: /usr/local/apisix/dashboard/logs
13 changes: 13 additions & 0 deletions deps/manager-api.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[Unit]
Description=APACHE APISIX Manager-api Service
After=network.target

[Service]
Type=simple
User=nobody
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/manager-api -p /usr/local/apisix/dashboard

[Install]
WantedBy=multi-user.target
7 changes: 5 additions & 2 deletions dockerfiles/Dockerfile.dashboard.rpm
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ ARG checkout_v
ARG iteration
ARG dashboard_repo
RUN set -x \
&& mkdir -p /tmp/build/output/apisix/dashboard/usr/bin/ \
&& mkdir -p /tmp/build/output/apisix/dashboard/usr/local/apisix/dashboard/ \
&& mkdir -pv /tmp/build/output/apisix/dashboard/usr/bin/ \
&& mkdir -pv /tmp/build/output/apisix/dashboard/usr/local/apisix/dashboard/ \
&& mkdir -pv /tmp/build/output/apisix/dashboard/usr/lib/systemd/system \
# config golang
&& export GO111MODULE=on \
&& export GOROOT=/usr/local/go \
Expand All @@ -31,6 +32,8 @@ RUN set -x \
&& mkdir gopath \
&& go env -w GOPROXY=https://goproxy.cn,direct \
&& cd /tmp/ \
# add startup script
&& curl --silent --location https://raw.githubusercontent.com/totemofwolf/apisix-build-tools/service/deps/manager-api.service | tee /tmp/build/output/apisix/dashboard/usr/lib/systemd/system/manager-api.service \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@totemofwolf I was wondering that if we should use the manager-api.service file within this commit? Thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you have put it in deps/manager-api.service, so don't need to download it, just need to mv...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like you have put it in deps/manager-api.service, so don't need to download it, just need to mv...

Yes u r right. But now I can't find a suitable way to do this. ;-)

# get source code and build
&& git clone ${dashboard_repo} \
&& cd apisix-dashboard \
Expand Down