diff --git a/README.md b/README.md index 95c8cb2..fa0b700 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# 九快记账个人部署方案 +# MoneyNote 个人部署方案 -本项目提供docker compose一键运行九快记账,搭建自己的记账环境。 +本项目提供docker compose一键运行 MoneyNote,搭建自己的记账环境。 适合所有能安装docker的机器运行,支持amd和arm架构。 @@ -12,19 +12,12 @@ ### 快速启动 -阿里云镜像启动(适合中国大陆) ```sh 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 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的镜像启动。 -阿里云镜像启动(适合中国大陆,此镜像无mysql服务,请将参数修改为自己的mysql服务。) - ```sh docker run --name moneynote -d \ -e DB_HOST=your_ip \ @@ -39,54 +32,26 @@ docker run --name moneynote -d \ registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-all-no-mysql:latest ``` -docker hub镜像启动(适合境外用户,此镜像无mysql服务,请将参数修改为自己的mysql服务。) -```sh -docker run --name moneynote -d \ - -e DB_HOST=your_ip \ - -e DB_PORT=3306 \ - -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/moneynote-all-no-mysql:latest -``` - ### docker compose 启动(推荐) 1. 请下载本项目源代码,使用git命令或直接下载源代码。 ```sh -git clone https://github.com/getmoneynote/docker-compose-moneynote.git && cd docker-compose-moneynote +git clone https://github.com/getmoneynote/docker-compose-moneynote-ali.git && cd docker-compose-moneynote-ali ``` 2. docker compose 启动 -docker hub ```sh docker compose up -d ``` -阿里云 -```sh -docker compose -f docker-compose-all-ali.yml up -d -``` - 3. 升级 -docker hub ```sh docker compose pull && docker compose up -d ``` -阿里云 -```sh -docker compose -f docker-compose-all-ali.yml pull && docker compose -f docker-compose-all-ali.yml up -d -``` - - 成功运行后,访问 [http://127.0.0.1:43743](http://127.0.0.1:43743) 可以打开网页版记账程序,使用前请注册一个账户,默认的邀请码是111111(6个1), 为防止被恶意注册,请修改默认邀请码。 使用手机浏览器访问,[http://127.0.0.1:43744](http://127.0.0.1:43744) (127.0.0.1替换成你的地址)。 @@ -98,82 +63,42 @@ phpMyAdmin登录的信息请对照api.env配置文件填写。请定期使用php #### docker命令说明 -docker hub with mysql 启动 (支持arm) -```sh -docker compose --env-file api.env -f docker-compose-hub.yml up -d -``` - -docker hub with mysql 升级 -```sh -docker compose --env-file api.env -f docker-compose-hub.yml pull && docker compose --env-file api.env -f docker-compose-hub.yml up -d -``` - -docker hub no mysql 启动 -```sh -docker compose --env-file api-no-mysql.env -f docker-compose-hub-no-mysql.yml up -d -``` - -docker hub no mysql 升级 -```sh -docker compose --env-file api-no-mysql.env -f docker-compose-hub-no-mysql.yml pull && docker compose --env-file api-no-mysql.env -f docker-compose-hub-no-mysql.yml up -d -``` - -阿里云 with mysql 启动 (支持arm) +with mysql 启动 (支持arm) ```sh docker compose --env-file api.env -f docker-compose-ali.yml up -d ``` -阿里云 with mysql 升级 +with mysql 升级 ```sh docker compose --env-file api.env -f docker-compose-ali.yml pull && docker compose --env-file api.env -f docker-compose-ali.yml up -d ``` -阿里云 no mysql 启动 +no mysql 启动 ```sh docker-compose --env-file api-no-mysql.env -f docker-compose-ali-no-mysql.yml up -d ``` -阿里云 no mysql 升级 +no mysql 升级 ```sh docker compose --env-file api-no-mysql.env -f docker-compose-ali-no-mysql.yml pull && docker-compose --env-file api-no-mysql.env -f docker-compose-ali-no-mysql.yml up -d ``` -docker 5 in 1 hub 启动 -```sh -docker compose --env-file api.env -f docker-compose-all-hub.yml up -d -``` - -docker 5 in 1 hub 升级 -```sh -docker compose -f docker-compose-all-hub.yml pull && docker compose --env-file api.env -f docker-compose-all-hub.yml up -d -``` - -docker 3 in 1 hub 启动 -```sh -docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-hub.yml up -d -``` - -docker 3 in 1 hub 升级 -```sh -docker compose -f docker-compose-all-hub.yml pull && docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-hub.yml up -d -``` - -阿里云 docker 5 in 1 启动 +docker 5 in 1 启动 ```sh docker compose --env-file api.env -f docker-compose-all-ali.yml up -d ``` -阿里云 docker 5 in 1 升级 +docker 5 in 1 升级 ```sh docker compose -f docker-compose-all-ali.yml pull && docker compose --env-file api.env -f docker-compose-all-ali.yml up -d ``` -阿里云 docker 3 in 1 启动 +docker 3 in 1 启动 ```sh docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-ali.yml up -d ``` -阿里云 docker 3 in 1 升级 +docker 3 in 1 升级 ```sh docker compose -f docker-compose-all-no-mysql-ali.yml pull && docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-ali.yml up -d ``` diff --git a/README_docker.md b/README_docker.md deleted file mode 100644 index f18cd74..0000000 --- a/README_docker.md +++ /dev/null @@ -1,13 +0,0 @@ -## 九快记账 - -Docker一键运行自己的记账系统 - -部署前,请确保已安装docker。如遇到任何问题欢迎加入 QQ群: 639653091 讨论。 - -## 如何使用 - -快速运行: - -```sh -docker run -p 43741:80 -p 43743:81 -p 43743:82 -e invite_code=111111 markliu2018/moneynote-all:latest -``` diff --git a/docker-compose-all-hub.yml b/docker-compose-all-hub.yml deleted file mode 100644 index be66464..0000000 --- a/docker-compose-all-hub.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: '3' - -services: - moneynote: - container_name: moneynote - image: markliu2018/moneynote-all:latest - restart: always - environment: - - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - - invite_code=${invite_code:-111111} - volumes: - - moneynote_mysql_data:/var/lib/mysql - ports: - - "43740:3306" - - "43741:80" - - "43742:9092" - - "43743:81" - - "43744:82" - -volumes: - moneynote_mysql_data: \ No newline at end of file diff --git a/docker-compose-all-no-mysql-hub.yml b/docker-compose-all-no-mysql-hub.yml deleted file mode 100644 index 8b733ba..0000000 --- a/docker-compose-all-no-mysql-hub.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '3' - -services: - 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:-moneynote} - - DB_USER=${DB_USER:-root} - - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - - invite_code=${invite_code:-111111} - ports: - - "43742:9092" - - "43743:81" - - "43744:82" diff --git a/docker-compose-hub-no-mysql.yml b/docker-compose-hub-no-mysql.yml deleted file mode 100644 index 6b3447a..0000000 --- a/docker-compose-hub-no-mysql.yml +++ /dev/null @@ -1,40 +0,0 @@ -version: '2.1' - -services: - 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:-moneynote} - - DB_USER=${DB_USER:-root} - - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - - invite_code=${invite_code:-111111} - ports: - - "43742:9092" - - pc: - container_name: moneynote_pc - links: - - api - image: markliu2018/moneynote-pc:latest - restart: always - environment: - USER_API_HOST: http://api:9092 - ports: - - "43743:80" - - h5: - container_name: moneynote_h5 - links: - - api - image: markliu2018/moneynote-h5:latest - restart: always - environment: - 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 deleted file mode 100644 index 9939970..0000000 --- a/docker-compose-hub.yml +++ /dev/null @@ -1,70 +0,0 @@ -version: '3' - -services: - mysql: - container_name: moneynote_mysql - image: markliu2018/mysql5-arm:latest - restart: always - environment: - - MYSQL_ROOT_PASSWORD= ${DB_PASSWORD:-78p7gkc1} - - MYSQL_DATABASE= moneynote - command: [ - '--character-set-server=utf8mb4', - '--collation-server=utf8mb4_general_ci', - ] - volumes: - - moneynote_mysql_data:/var/lib/mysql - ports: - - "43740:3306" - - phpmyadmin: - container_name: moneynote_phpmyadmin - image: markliu2018/phpmyadmin5:latest - restart: always - links: - - mysql - environment: - PMA_ARBITRARY: 1 - ports: - - "43741:80" - - api: - container_name: moneynote_api - links: - - mysql - image: markliu2018/moneynote-api:latest - restart: always - environment: - - DB_HOST=mysql - - DB_PORT=3306 - - DB_NAME=moneynote - - DB_USER=root - - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - - invite_code=${invite_code:-111111} - ports: - - "43742:9092" - - pc: - container_name: moneynote_pc - links: - - api - image: markliu2018/moneynote-pc:latest - restart: always - environment: - USER_API_HOST: http://api:9092 - ports: - - "43743:80" - - h5: - container_name: moneynote_h5 - links: - - api - image: markliu2018/moneynote-h5:latest - restart: always - environment: - USER_API_HOST: http://api:9092 - ports: - - "43744:80" - -volumes: - moneynote_mysql_data: \ No newline at end of file diff --git a/docker-compose-no-mysql.yml b/docker-compose-no-mysql.yml deleted file mode 100644 index 78628b2..0000000 --- a/docker-compose-no-mysql.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: '3' - -services: - 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:-moneynote} - - DB_USER=${DB_USER:-root} - - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1} - - invite_code=${invite_code:-111111} - ports: - - "43742:9092" - - "43743:81" - - "43744:82" \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index be66464..c3d8b12 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: moneynote: container_name: moneynote - image: markliu2018/moneynote-all:latest + image: registry.cn-hangzhou.aliyuncs.com/moneynote/moneynote-all:latest restart: always environment: - DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}