diff --git a/README.md b/README.md index 867ec7b..95c8cb2 100644 --- a/README.md +++ b/README.md @@ -14,11 +14,11 @@ 阿里云镜像启动(适合中国大陆) ```sh -docker run --name moneywhere -e DB_PASSWORD=78p7gkc1 -e invite_code=111111 -v moneywhere_mysql_data:/var/lib/mysql -p 43740:3306 -p 43741:80 -p 43742:9092 -p 43743:81 -p 43744:82 registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all:latest +docker run --name moneynote -e DB_PASSWORD=78p7gkc1 -e invite_code=111111 -v moneynote_mysql_data:/var/lib/mysql -p 43740:3306 -p 43741:80 -p 43742:9092 -p 43743:81 -p 43744:82 registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-all:latest ``` docker hub镜像启动(适合境外用户) ```sh -docker run --name moneywhere -e DB_PASSWORD=78p7gkc1 -e invite_code=111111 -v moneywhere_mysql_data:/var/lib/mysql -p 43740:3306 -p 43741:80 -p 43742:9092 -p 43743:81 -p 43744:82 markliu2018/moneywhere-all:latest +docker run --name moneynote -e DB_PASSWORD=78p7gkc1 -e invite_code=111111 -v moneynote_mysql_data:/var/lib/mysql -p 43740:3306 -p 43741:80 -p 43742:9092 -p 43743:81 -p 43744:82 markliu2018/moneynote-all:latest ``` 如果已有mysql服务,可使用不带mysql的镜像启动。 @@ -26,32 +26,32 @@ docker run --name moneywhere -e DB_PASSWORD=78p7gkc1 -e invite_code=111111 -v mo 阿里云镜像启动(适合中国大陆,此镜像无mysql服务,请将参数修改为自己的mysql服务。) ```sh -docker run --name moneywhere -d \ +docker run --name moneynote -d \ -e DB_HOST=your_ip \ -e DB_PORT=3306 \ - -e DB_NAME=moneywhere \ + -e DB_NAME=moneynote \ -e DB_USER=root \ -e DB_PASSWORD=your_password \ -e invite_code=111111 \ -p 43742:9092 \ -p 43743:81 \ -p 43744:82 \ - registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all-no-mysql:latest + registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-all-no-mysql:latest ``` docker hub镜像启动(适合境外用户,此镜像无mysql服务,请将参数修改为自己的mysql服务。) ```sh -docker run --name moneywhere -d \ +docker run --name moneynote -d \ -e DB_HOST=your_ip \ -e DB_PORT=3306 \ - -e DB_NAME=moneywhere \ + -e DB_NAME=moneynote \ -e DB_USER=root \ -e DB_PASSWORD=your_password \ -e invite_code=111111 \ -p 43742:9092 \ -p 43743:81 \ -p 43744:82 \ - markliu2018/moneywhere-all-no-mysql:latest + markliu2018/moneynote-all-no-mysql:latest ``` ### docker compose 启动(推荐) @@ -59,7 +59,7 @@ docker run --name moneywhere -d \ 1. 请下载本项目源代码,使用git命令或直接下载源代码。 ```sh -git clone https://github.com/getmoneynote/docker-compose-moneywhere.git && cd docker-compose-moneywhere +git clone https://github.com/getmoneynote/docker-compose-moneynote.git && cd docker-compose-moneynote ``` 2. docker compose 启动 @@ -180,7 +180,7 @@ docker compose -f docker-compose-all-no-mysql-ali.yml pull && docker compose --e ## QA -1. 很多人安装遇到数据库的问题,有可能是之前安装过,有数据文件,且自己修改过root密码。 使用 docker volume ls 命令查看有没有moneywhere_mysql_data文件,如果有,可以自己修改为另外的数据文件,或者删除moneywhere_mysql_data +1. 很多人安装遇到数据库的问题,有可能是之前安装过,有数据文件,且自己修改过root密码。 使用 docker volume ls 命令查看有没有moneynote_mysql_data文件,如果有,可以自己修改为另外的数据文件,或者删除moneynote_mysql_data ## 参考资料 [安装docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7) \ No newline at end of file diff --git a/README_docker.md b/README_docker.md index 84eba87..f18cd74 100644 --- a/README_docker.md +++ b/README_docker.md @@ -9,5 +9,5 @@ Docker一键运行自己的记账系统 快速运行: ```sh -docker run -p 43741:80 -p 43743:81 -p 43743:82 -e invite_code=111111 markliu2018/moneywhere-all:latest +docker run -p 43741:80 -p 43743:81 -p 43743:82 -e invite_code=111111 markliu2018/moneynote-all:latest ``` diff --git a/api-no-mysql.env b/api-no-mysql.env index 6f305fb..352cf65 100644 --- a/api-no-mysql.env +++ b/api-no-mysql.env @@ -1,6 +1,6 @@ DB_HOST=host.docker.internal DB_PORT=3306 -DB_NAME=moneywhere +DB_NAME=moneynote DB_USER=root DB_PASSWORD=78p7gkc1 invite_code=111111 \ No newline at end of file diff --git a/docker-compose-ali-no-mysql.yml b/docker-compose-ali-no-mysql.yml index 347c572..fb26c11 100644 --- a/docker-compose-ali-no-mysql.yml +++ b/docker-compose-ali-no-mysql.yml @@ -1,40 +1,40 @@ version: '3' services: - moneywhere-api-user: - container_name: moneywhere_api - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest + api: + container_name: moneynote_api + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-api:latest restart: always extra_hosts: - "host.docker.internal:host-gateway" environment: - DB_HOST=${DB_HOST:-host.docker.internal} - DB_PORT=${DB_PORT:-3306} - - DB_NAME=${DB_NAME:-moneywhere} + - DB_NAME=${DB_NAME:-moneynote} - DB_USER=${DB_USER:-root} - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} ports: - "43742:9092" - moneywhere-fe-user: - container_name: moneywhere_fe + pc: + container_name: moneynote_pc links: - - moneywhere-api-user - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user:latest + - api + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-pc:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43743:80" - moneywhere-fe-user-mobile: - container_name: moneywhere_fe_mobile + h5: + container_name: moneynote_h5 links: - - moneywhere-api-user - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user-mobile:latest + - api + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-h5:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43744:80" \ No newline at end of file diff --git a/docker-compose-ali.yml b/docker-compose-ali.yml index c169be1..ee199e8 100644 --- a/docker-compose-ali.yml +++ b/docker-compose-ali.yml @@ -2,24 +2,24 @@ version: '3' services: mysql: - container_name: moneywhere_mysql - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/mysql5-arm:latest + container_name: moneynote_mysql + image: registry.cn-hangzhou.aliyuncs.com/moneynote/mysql5-arm:latest restart: always environment: - MYSQL_ROOT_PASSWORD=${DB_PASSWORD:-78p7gkc1} - - MYSQL_DATABASE=moneywhere + - MYSQL_DATABASE=moneynote command: [ '--character-set-server=utf8mb4', '--collation-server=utf8mb4_general_ci', ] volumes: - - moneywhere_mysql_data:/var/lib/mysql + - moneynote_mysql_data:/var/lib/mysql ports: - "43740:3306" phpmyadmin: - container_name: moneywhere_phpmyadmin - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/phpmyadmin5:latest + container_name: moneynote_phpmyadmin + image: registry.cn-hangzhou.aliyuncs.com/moneynote/phpmyadmin5:latest links: - mysql environment: @@ -28,43 +28,43 @@ services: ports: - "43741:80" - moneywhere-api-user: - container_name: moneywhere_api + api: + container_name: moneynote_api links: - mysql - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-api:latest restart: always environment: - DB_HOST=mysql - DB_PORT=3306 - - DB_NAME=moneywhere + - DB_NAME=moneynote - DB_USER=root - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} ports: - "43742:9092" - moneywhere-fe-user: - container_name: moneywhere_fe + pc: + container_name: moneynote_pc links: - - moneywhere-api-user - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user:latest + - api + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-pc:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43743:80" - moneywhere-fe-user-mobile: - container_name: moneywhere_fe_mobile + h5: + container_name: moneynote_h5 links: - - moneywhere-api-user - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user-mobile:latest + - api + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-h5:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43744:80" volumes: - moneywhere_mysql_data: \ No newline at end of file + moneynote_mysql_data: \ No newline at end of file diff --git a/docker-compose-all-ali.yml b/docker-compose-all-ali.yml index 957a121..c3d8b12 100644 --- a/docker-compose-all-ali.yml +++ b/docker-compose-all-ali.yml @@ -1,15 +1,15 @@ version: '3' services: - moneywhere: - container_name: moneywhere - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all:latest + moneynote: + container_name: moneynote + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-all:latest restart: always environment: - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} volumes: - - moneywhere_mysql_data:/var/lib/mysql + - moneynote_mysql_data:/var/lib/mysql ports: - "43740:3306" - "43741:80" @@ -18,4 +18,4 @@ services: - "43744:82" volumes: - moneywhere_mysql_data: \ No newline at end of file + moneynote_mysql_data: \ No newline at end of file diff --git a/docker-compose-all-hub.yml b/docker-compose-all-hub.yml index 0b42f12..be66464 100644 --- a/docker-compose-all-hub.yml +++ b/docker-compose-all-hub.yml @@ -1,15 +1,15 @@ version: '3' services: - moneywhere: - container_name: moneywhere - image: markliu2018/moneywhere-all:latest + moneynote: + container_name: moneynote + image: markliu2018/moneynote-all:latest restart: always environment: - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} volumes: - - moneywhere_mysql_data:/var/lib/mysql + - moneynote_mysql_data:/var/lib/mysql ports: - "43740:3306" - "43741:80" @@ -18,4 +18,4 @@ services: - "43744:82" volumes: - moneywhere_mysql_data: \ No newline at end of file + moneynote_mysql_data: \ No newline at end of file diff --git a/docker-compose-all-no-mysql-ali.yml b/docker-compose-all-no-mysql-ali.yml index 6c00c69..0eb2bfd 100644 --- a/docker-compose-all-no-mysql-ali.yml +++ b/docker-compose-all-no-mysql-ali.yml @@ -1,16 +1,16 @@ version: '3' services: - moneywhere: - container_name: moneywhere - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all-no-mysql:latest + moneynote: + container_name: moneynote + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-all-no-mysql:latest restart: always extra_hosts: - "host.docker.internal:host-gateway" environment: - DB_HOST=${DB_HOST:-host.docker.internal} - DB_PORT=${DB_PORT:-3306} - - DB_NAME=${DB_NAME:-moneywhere} + - DB_NAME=${DB_NAME:-moneynote} - DB_USER=${DB_USER:-root} - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} diff --git a/docker-compose-all-no-mysql-hub.yml b/docker-compose-all-no-mysql-hub.yml index a4ec2b5..8b733ba 100644 --- a/docker-compose-all-no-mysql-hub.yml +++ b/docker-compose-all-no-mysql-hub.yml @@ -1,16 +1,16 @@ version: '3' services: - moneywhere: - container_name: moneywhere - image: markliu2018/moneywhere-all-no-mysql:latest + moneynote: + container_name: moneynote + image: markliu2018/moneynote-all-no-mysql:latest restart: always extra_hosts: - "host.docker.internal:host-gateway" environment: - DB_HOST=${DB_HOST:-host.docker.internal} - DB_PORT=${DB_PORT:-3306} - - DB_NAME=${DB_NAME:-moneywhere} + - DB_NAME=${DB_NAME:-moneynote} - DB_USER=${DB_USER:-root} - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} diff --git a/docker-compose-hub-no-mysql.yml b/docker-compose-hub-no-mysql.yml index cfd4292..6b3447a 100644 --- a/docker-compose-hub-no-mysql.yml +++ b/docker-compose-hub-no-mysql.yml @@ -1,40 +1,40 @@ version: '2.1' services: - moneywhere-api-user: - container_name: moneywhere_api - image: markliu2018/moneywhere-api-user:latest + api: + container_name: moneynote_api + image: markliu2018/moneynote-api:latest restart: always extra_hosts: - "host.docker.internal:host-gateway" environment: - DB_HOST=${DB_HOST:-host.docker.internal} - DB_PORT=${DB_PORT:-3306} - - DB_NAME=${DB_NAME:-moneywhere} + - DB_NAME=${DB_NAME:-moneynote} - DB_USER=${DB_USER:-root} - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} ports: - "43742:9092" - moneywhere-fe-user: - container_name: moneywhere_fe + pc: + container_name: moneynote_pc links: - - moneywhere-api-user - image: markliu2018/moneywhere-fe-user:latest + - api + image: markliu2018/moneynote-pc:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43743:80" - moneywhere-fe-user-mobile: - container_name: moneywhere_fe_mobile + h5: + container_name: moneynote_h5 links: - - moneywhere-api-user - image: markliu2018/moneywhere-fe-user-mobile:latest + - api + image: markliu2018/moneynote-h5:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43744:80" \ No newline at end of file diff --git a/docker-compose-hub.yml b/docker-compose-hub.yml index 2001873..9939970 100644 --- a/docker-compose-hub.yml +++ b/docker-compose-hub.yml @@ -2,23 +2,23 @@ version: '3' services: mysql: - container_name: moneywhere_mysql + container_name: moneynote_mysql image: markliu2018/mysql5-arm:latest restart: always environment: - MYSQL_ROOT_PASSWORD= ${DB_PASSWORD:-78p7gkc1} - - MYSQL_DATABASE= moneywhere + - MYSQL_DATABASE= moneynote command: [ '--character-set-server=utf8mb4', '--collation-server=utf8mb4_general_ci', ] volumes: - - moneywhere_mysql_data:/var/lib/mysql + - moneynote_mysql_data:/var/lib/mysql ports: - "43740:3306" phpmyadmin: - container_name: moneywhere_phpmyadmin + container_name: moneynote_phpmyadmin image: markliu2018/phpmyadmin5:latest restart: always links: @@ -28,43 +28,43 @@ services: ports: - "43741:80" - moneywhere-api-user: - container_name: moneywhere_api + api: + container_name: moneynote_api links: - mysql - image: markliu2018/moneywhere-api-user:latest + image: markliu2018/moneynote-api:latest restart: always environment: - DB_HOST=mysql - DB_PORT=3306 - - DB_NAME=moneywhere + - DB_NAME=moneynote - DB_USER=root - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} ports: - "43742:9092" - moneywhere-fe-user: - container_name: moneywhere_fe + pc: + container_name: moneynote_pc links: - - moneywhere-api-user - image: markliu2018/moneywhere-fe-user:latest + - api + image: markliu2018/moneynote-pc:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43743:80" - moneywhere-fe-user-mobile: - container_name: moneywhere_fe_mobile + h5: + container_name: moneynote_h5 links: - - moneywhere-api-user - image: markliu2018/moneywhere-fe-user-mobile:latest + - api + image: markliu2018/moneynote-h5:latest restart: always environment: - USER_API_HOST: http://moneywhere-api-user:9092 + USER_API_HOST: http://api:9092 ports: - "43744:80" volumes: - moneywhere_mysql_data: \ No newline at end of file + moneynote_mysql_data: \ No newline at end of file diff --git a/docker-compose-no-mysql.yml b/docker-compose-no-mysql.yml index 153362c..78628b2 100644 --- a/docker-compose-no-mysql.yml +++ b/docker-compose-no-mysql.yml @@ -1,16 +1,16 @@ version: '3' services: - moneywhere: - container_name: moneywhere - image: markliu2018/moneywhere-all-no-mysql:latest + moneynote: + container_name: moneynote + image: markliu2018/moneynote-all-no-mysql:latest restart: always extra_hosts: - "host.docker.internal:host-gateway" environment: - DB_HOST=${DB_HOST:-host.docker.internal} - DB_PORT=${DB_PORT:-3306} - - DB_NAME=${DB_NAME:-moneywhere} + - DB_NAME=${DB_NAME:-moneynote} - DB_USER=${DB_USER:-root} - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} diff --git a/docker-compose.yml b/docker-compose.yml index 0b42f12..be66464 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,15 +1,15 @@ version: '3' services: - moneywhere: - container_name: moneywhere - image: markliu2018/moneywhere-all:latest + moneynote: + container_name: moneynote + image: markliu2018/moneynote-all:latest restart: always environment: - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - invite_code=${invite_code:-111111} volumes: - - moneywhere_mysql_data:/var/lib/mysql + - moneynote_mysql_data:/var/lib/mysql ports: - "43740:3306" - "43741:80" @@ -18,4 +18,4 @@ services: - "43744:82" volumes: - moneywhere_mysql_data: \ No newline at end of file + moneynote_mysql_data: \ No newline at end of file diff --git a/docker-compose_health_check_bak.yml b/docker-compose_health_check_bak.yml deleted file mode 100644 index 1284145..0000000 --- a/docker-compose_health_check_bak.yml +++ /dev/null @@ -1,56 +0,0 @@ -version: '2.1' - -services: - mysql: - build: ./mysql/ - command: --init-file /data/1.sql - restart: always - environment: - MYSQL_ROOT_PASSWORD: NWPkVrO2 - MYSQL_DATABASE: moneywhere - volumes: - - moneywhere_mysql_data:/var/lib/mysql - healthcheck: - test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -pNWPkVrO2 | grep 'mysqld is alive' || exit 1"] - timeout: 20s - retries: 10 - - phpmyadmin: - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/phpmyadmin:latest - links: - - mysql - environment: - PMA_HOST: mysql - PMA_PORT: 3306 - PMA_ARBITRARY: 1 - restart: always - ports: - - "8085:80" - - moneywhere-api-user: - depends_on: - mysql: - condition: service_healthy - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest - env_file: api.env - - moneywhere-fe-user: - links: - - moneywhere-api-user - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user:latest - environment: - USER_API_HOST: http://moneywhere-api-user:9092 - ports: - - "9097:80" - - moneywhere-fe-user-mobile: - links: - - moneywhere-api-user - image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user-mobile:latest - environment: - USER_API_HOST: http://moneywhere-api-user:9092 - ports: - - "9098:80" - -volumes: - moneywhere_mysql_data: \ No newline at end of file