qiaogw opened a new issue, #373:
URL: https://github.com/apache/apisix-docker/issues/373
docker-compose:
version: '3.5'
# 网络配置
networks:
dev_net:
driver: bridge
# 服务容器配置
services:
etcd:
# 自定义容器名称
image: quay.io/coreos/etcd:v3.5.1 # 镜像
container_name: etcd
environment:
- TZ=${TZ}
- ETCD_NAME=etcd
- ALLOW_NONE_AUTHENTICATION=yes
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379,http://127.0.0.1:2379
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379 # 用于监听客户端通讯的URL列表
ports:
# 设置端口映射
- ${ETCD_PORT}:2379
networks:
- dev_net
restart: always
apisix:
image: apache/apisix:3.0.0-debian
restart: always
container_name: apisix
environment:
- LANG=zh_CN.UTF-8
# - LC_ALL=zh_CN.UTF-8
- TZ=Asia/Shanghai
volumes:
# - ./apisix/apisix_log:/usr/local/apisix/logs
- ./apisix/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml
- /etc/localtime:/etc/localtime:ro
depends_on:
- etcd
ports:
- '9180:9180/tcp'
- '9080:9080/tcp'
- '19091:9091/tcp'
- '9443:9443/tcp'
networks:
- dev_net
web1:
image: nginx:1.19.0-alpine
restart: always
container_name: apisix-web1
environment:
- LANG=zh_CN.UTF-8
- LC_ALL=zh_CN.UTF-8
- TZ=Asia/Shanghai
- NGINX_PORT=80
volumes:
# - ./apisix/upstream/web1.conf:/etc/nginx/nginx.conf
- /etc/localtime:/etc/localtime:ro
ports:
- '9081:80/tcp'
networks:
- dev_net
web2:
image: nginx:1.19.0-alpine
restart: always
container_name: apisix-web2
environment:
- LANG=zh_CN.UTF-8
- LC_ALL=zh_CN.UTF-8
- TZ=Asia/Shanghai
- NGINX_PORT=80
volumes:
# - ./apisix/upstream/web2.conf:/etc/nginx/nginx.conf
- /etc/localtime:/etc/localtime:ro
ports:
- '9082:80/tcp'
networks:
- dev_net
docker env: wsl2 debain. docker start and service ok .
But when docker service restart, apisix fail this error .
must edit the docker-compose.yml file anywhere then restart succes .
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]