File tree Expand file tree Collapse file tree 6 files changed +85
-5
lines changed
Expand file tree Collapse file tree 6 files changed +85
-5
lines changed Original file line number Diff line number Diff line change 1+ name : Docker compose CI on linux
2+
3+ on :
4+ push :
5+ branches : [ master, kv/alpine ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v2
14+ - name : use docker-compose
15+ run : cd ./example && sh gen-config-yaml.sh && docker-compose -f docker-compose-alpine.yml -p docker-apisix up -d
Original file line number Diff line number Diff line change 1212 steps :
1313 - uses : actions/checkout@v2
1414 - name : use docker-compose
15- run : cd ./example && docker-compose -p docker-apisix up -d
15+ run : cd ./example && sh gen-config-yaml.sh && docker-compose -p docker-apisix up -d
Original file line number Diff line number Diff line change 11### Run
22
33```
4- $ chmod +x gen-config-yaml.sh
5- $ sh gen-config-yaml.sh
6- $ docker-compose -p docker-apisix up -d
4+ $ sh gen-config-yaml.sh && docker-compose -p docker-apisix up -d
75```
86
97### Configure
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+ apisix :
5+ build :
6+ context : ./..
7+ dockerfile : alpine/Dockerfile
8+ args :
9+ APISIX_VERSION : master
10+ restart : always
11+ volumes :
12+ - ./apisix_log:/usr/local/apisix/logs
13+ - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
14+ depends_on :
15+ - etcd
16+ ports :
17+ - " 9080:9080/tcp"
18+ - " 9443:9443/tcp"
19+ networks :
20+ apisix :
21+ ipv4_address : 172.18.5.11
22+
23+ etcd :
24+ image : bitnami/etcd:3.4.9
25+ user : root
26+ restart : always
27+ volumes :
28+ - ./etcd_data:/etcd_data
29+ environment :
30+ ETCD_DATA_DIR : /etcd_data
31+ ETCD_ENABLE_V2 : " true"
32+ ALLOW_NONE_AUTHENTICATION : " yes"
33+ ETCD_ADVERTISE_CLIENT_URLS : " http://0.0.0.0:2379"
34+ ETCD_LISTEN_CLIENT_URLS : " http://0.0.0.0:2379"
35+ ports :
36+ - " 2379:2379/tcp"
37+ networks :
38+ apisix :
39+ ipv4_address : 172.18.5.10
40+
41+ web1 :
42+ image : ruby:2-alpine
43+ command : sh -c "mkdir -p /tmp/www && echo 'web1' > /tmp/www/web1.txt && ruby -run -ehttpd /tmp/www -p8000"
44+ restart : always
45+ ports :
46+ - " 9081:8000/tcp"
47+ networks :
48+ apisix :
49+ ipv4_address : 172.18.5.12
50+
51+ web2 :
52+ image : ruby:2-alpine
53+ command : sh -c "mkdir -p /tmp/www && echo 'web2' > /tmp/www/web2.txt && ruby -run -ehttpd /tmp/www -p8000"
54+ restart : always
55+ ports :
56+ - " 9082:8000/tcp"
57+ networks :
58+ apisix :
59+ ipv4_address : 172.18.5.13
60+
61+ networks :
62+ apisix :
63+ driver : bridge
64+ ipam :
65+ config :
66+ - subnet : 172.18.0.0/16
Original file line number Diff line number Diff line change 11version : " 3"
22
33services :
4+
45 apisix :
56 build :
67 context : ./..
Original file line number Diff line number Diff line change 11#! /bin/sh
22
3- export etcd_url=' http://172.18.5.10 :2379'
3+ export etcd_url=' http://etcd :2379'
44
55wget https://raw.githubusercontent.com/apache/apisix/master/conf/config-default.yaml -O config.yaml
66
You can’t perform that action at this time.
0 commit comments