-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow config.yaml to be updated when already present for standal…
…one mode (#494) (#497) Signed-off-by: Ashish Tiwari <[email protected]>
- Loading branch information
1 parent
bc7c398
commit c68d009
Showing
10 changed files
with
179 additions
and
23 deletions.
There are no files selected for viewing
69 changes: 69 additions & 0 deletions
69
.github/workflows/apisix-docker-example-test-standalone.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Docker compose CI for example with standalone mode | ||
|
||
on: | ||
schedule: | ||
- cron: "0 1 * * *" | ||
push: | ||
branches: [master] | ||
paths-ignore: | ||
- 'docs/**' | ||
- '**/*.md' | ||
pull_request: | ||
branches: | ||
- master | ||
- 'release/apisix-2.15.**' | ||
|
||
env: | ||
APISIX_VERSION: "3.5.0" | ||
|
||
jobs: | ||
prepare: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Set apisix version | ||
id: apisix | ||
run: | | ||
branch=${{ github.base_ref }} | ||
apisix_version=$( (echo ${branch} | grep -Po '\d*\.\d*\.\d*') || echo ${APISIX_VERSION} ) | ||
echo "version=${apisix_version}" >> $GITHUB_OUTPUT | ||
outputs: | ||
apisix-version: ${{ steps.apisix.outputs.version }} | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
needs: prepare | ||
env: | ||
APISIX_VERSION: ${{ needs.prepare.outputs.apisix-version }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
platform: | ||
- centos | ||
- debian | ||
- redhat | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Build image | ||
run: | | ||
make build-on-${{ matrix.platform }} | ||
- name: use docker-compose | ||
env: | ||
APISIX_IMAGE_TAG: ${{ format('{0}-{1}', env.APISIX_VERSION, matrix.platform) }} | ||
APISIX_STAND_ALONE: true | ||
run: docker-compose -p docker-apisix -f example/docker-compose-standalone.yml up -d | ||
|
||
- name: Test APISIX | ||
run: | | ||
sleep 50 #startup time maybe a little longer as the yq binary is downloaded for use at runtime | ||
result_code=`curl -I -m 10 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/get` | ||
if [[ $result_code -ne 200 ]];then | ||
printf "result_code: %s\n" "$result_code" | ||
exit 125 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
routes: | ||
- | ||
uri: /get | ||
upstream: | ||
nodes: | ||
"web1:80": 1 | ||
type: roundrobin | ||
#END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# | ||
# 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. | ||
# | ||
|
||
version: "3" | ||
|
||
services: | ||
apisix: | ||
image: apache/apisix:${APISIX_IMAGE_TAG:-3.5.0-debian} | ||
restart: always | ||
volumes: | ||
- ./apisix_conf/apisix-standalone.yaml:/usr/local/apisix/conf/apisix.yaml:ro | ||
environment: | ||
- APISIX_STAND_ALONE=true | ||
ports: | ||
- "9180:9180/tcp" | ||
- "9080:9080/tcp" | ||
- "9091:9091/tcp" | ||
- "9443:9443/tcp" | ||
- "9092:9092/tcp" | ||
networks: | ||
apisix: | ||
|
||
web1: | ||
image: nginx:1.19.0-alpine | ||
restart: always | ||
volumes: | ||
- ./upstream/web1.conf:/etc/nginx/nginx.conf | ||
ports: | ||
- "9081:80/tcp" | ||
environment: | ||
- NGINX_PORT=80 | ||
networks: | ||
apisix: | ||
|
||
|
||
networks: | ||
apisix: | ||
driver: bridge | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters