first commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
routes:
|
||||
- id: bff
|
||||
name: bff
|
||||
uris:
|
||||
- /admin/*
|
||||
- /api/*
|
||||
- /app/*
|
||||
methods:
|
||||
- GET
|
||||
- POST
|
||||
- PUT
|
||||
- OPTIONS
|
||||
upstream:
|
||||
type: roundrobin
|
||||
nodes:
|
||||
"bff:10000": 1
|
||||
#END
|
||||
@@ -0,0 +1,13 @@
|
||||
apisix:
|
||||
node_listen: 9080
|
||||
enable_ipv6: false
|
||||
|
||||
plugins:
|
||||
- proxy-rewrite
|
||||
- cors
|
||||
- limit-req
|
||||
|
||||
deployment:
|
||||
role: data_plane
|
||||
role_data_plane:
|
||||
config_provider: yaml
|
||||
@@ -0,0 +1,36 @@
|
||||
services:
|
||||
bff:
|
||||
image: golang:1.24.3
|
||||
volumes:
|
||||
- ..:/src
|
||||
- go-mod-cache:/go/pkg/mod
|
||||
working_dir: /src/bff
|
||||
command: go run . -f etc/bff.yaml
|
||||
ports:
|
||||
- "10000:10000"
|
||||
environment:
|
||||
NACOS_SERVER_ADDR: rnacos:8848
|
||||
depends_on:
|
||||
- rnacos
|
||||
|
||||
product:
|
||||
image: golang:1.24.3
|
||||
volumes:
|
||||
- ..:/src
|
||||
- go-mod-cache:/go/pkg/mod
|
||||
working_dir: /src/product
|
||||
command: go run . -f etc/product.yaml
|
||||
ports:
|
||||
- "10100:10100"
|
||||
environment:
|
||||
NACOS_SERVER_ADDR: rnacos:8848
|
||||
depends_on:
|
||||
- rnacos
|
||||
|
||||
volumes:
|
||||
go-mod-cache:
|
||||
|
||||
networks:
|
||||
default:
|
||||
external: true
|
||||
name: server-network
|
||||
@@ -0,0 +1,38 @@
|
||||
services:
|
||||
|
||||
rnacos:
|
||||
image: qingpan/rnacos:stable
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "8848:8848"
|
||||
volumes:
|
||||
- ./rnacos/data:/app/data
|
||||
environment:
|
||||
RNACOS_SERVER_PORT: 8848
|
||||
RNACOS_ENABLE_NO_AUTH_CONSOLE: "true"
|
||||
|
||||
apisix:
|
||||
image: apache/apisix:3.17.0-debian
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- ./apisix/config.yaml:/usr/local/apisix/conf/config.yaml:ro
|
||||
- ./apisix/apisix.yaml:/usr/local/apisix/conf/apisix.yaml:ro
|
||||
ports:
|
||||
- "9080:9080" # 业务入口
|
||||
- "9443:9443" # HTTPS
|
||||
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: "123123"
|
||||
ports:
|
||||
- "3306:3306"
|
||||
volumes:
|
||||
- ./mysql/data:/var/lib/mysql
|
||||
# - ./mysql/init:/docker-entrypoint-initdb.d:ro
|
||||
|
||||
networks:
|
||||
default:
|
||||
external: true
|
||||
name: server-network
|
||||
Reference in New Issue
Block a user