Skip to content

bug: Apisix Config File Overwritten in Standalone Mode #401

@sashokbg

Description

@sashokbg

Current Behavior

Following the tutorial:

https://apisix.apache.org/docs/apisix/stand-alone/ and using https://github.com/apache/apisix-docker

I set mu apisix server in standalone mode

apisix:
image: apache/apisix:latest
restart: always
environment:
APISIX_STAND_ALONE: true
volumes:
- error_vol:/usr/local/apisix/logs
- ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml
depends_on:
- etcd
ports:
- "9180:9180/tcp"
- "9080:9080/tcp"
- "9091:9091/tcp"
- "9443:9443/tcp"
- "9092:9092/tcp"
network_mode: host

And when I start the server the config.yaml file gets overwritten and all my routes / upstreams disappear.

Expected Behavior

When Starting the docker compose with a volume - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml then the config.yaml should be read into memory as described in the documentation

Error Logs

No response

Steps to Reproduce

  1. Use the docker compose example - https://github.com/apache/apisix-docker/tree/master/example
  2. Set APISIX_STAND_ALONE: true
  3. Put some routes in apisix_conf/config.yaml
  4. Run docker-compose up
  5. Check the dashboard - no routes imported and file has been overwritten

PS: if you don't remove the :ro flag from the volume mount the server does not start at all

Environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions