diff --git a/README.md b/README.md index 3f95fa3..31a2b94 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ 阿里云镜像启动(适合中国大陆) ```sh -docker run -d \ +docker run --name moneywhere -d \ -e DB_PASSWORD=78p7gkc1 \ -e invite_code=111111 \ -v moneywhere_mysql_data:/var/lib/mysql \ @@ -27,7 +27,7 @@ docker run -d \ ``` docker hub镜像启动(适合境外用户) ```sh -docker run -d \ +docker run --name moneywhere -d \ -e DB_PASSWORD=78p7gkc1 \ -e invite_code=111111 \ -v moneywhere_mysql_data:/var/lib/mysql \ @@ -44,7 +44,7 @@ docker run -d \ 阿里云镜像启动(适合中国大陆,此镜像无mysql服务,请将参数修改为自己的mysql服务。) ```sh -docker run -d \ +docker run --name moneywhere -d \ -e DB_HOST=host.docker.internal \ -e DB_PORT=3306 \ -e DB_NAME=moneywhere \ @@ -59,7 +59,7 @@ docker run -d \ docker hub镜像启动(适合境外用户,此镜像无mysql服务,请将参数修改为自己的mysql服务。) ```sh -docker run -d \ +docker run --name moneywhere -d \ -e DB_HOST=host.docker.internal \ -e DB_PORT=3306 \ -e DB_NAME=moneywhere \ diff --git a/docker-compose-all-hub.yml b/docker-compose-all-hub.yml index 157c503..0b42f12 100644 --- a/docker-compose-all-hub.yml +++ b/docker-compose-all-hub.yml @@ -6,8 +6,8 @@ services: image: markliu2018/moneywhere-all:latest restart: always environment: - - DB_PASSWORD=78p7gkc1 - - invite_code=111111 + - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} + - invite_code=${invite_code:-111111} volumes: - moneywhere_mysql_data:/var/lib/mysql ports: diff --git a/docker-compose-all-no-mysql-ali.yml b/docker-compose-all-no-mysql-ali.yml index 73b6474..426da81 100644 --- a/docker-compose-all-no-mysql-ali.yml +++ b/docker-compose-all-no-mysql-ali.yml @@ -6,12 +6,12 @@ services: image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all-no-mysql:latest restart: always environment: - - DB_HOST=host.docker.internal - - DB_PORT=3306 - - DB_NAME=moneywhere - - DB_USER=root - - DB_PASSWORD=111111 - - invite_code=111111 + - DB_HOST=${DB_HOST} + - DB_PORT=${DB_PORT} + - DB_NAME=${DB_NAME} + - DB_USER=${DB_USER} + - DB_PASSWORD=${DB_PASSWORD} + - invite_code=${invite_code} ports: - "43742:9092" - "43743:81" diff --git a/docker-compose.yml b/docker-compose.yml index 157c503..0b42f12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,8 @@ services: image: markliu2018/moneywhere-all:latest restart: always environment: - - DB_PASSWORD=78p7gkc1 - - invite_code=111111 + - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} + - invite_code=${invite_code:-111111} volumes: - moneywhere_mysql_data:/var/lib/mysql ports: