Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
anonymous committed Feb 17, 2024
1 parent 5736990 commit f9f5497
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 163 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,52 +14,52 @@

阿里云镜像启动(适合中国大陆)
```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的镜像启动。

阿里云镜像启动(适合中国大陆,此镜像无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 启动(推荐)

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 启动
Expand Down Expand Up @@ -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)
2 changes: 1 addition & 1 deletion README_docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```
2 changes: 1 addition & 1 deletion api-no-mysql.env
Original file line number Diff line number Diff line change
@@ -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
28 changes: 14 additions & 14 deletions docker-compose-ali-no-mysql.yml
Original file line number Diff line number Diff line change
@@ -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"
42 changes: 21 additions & 21 deletions docker-compose-ali.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
moneynote_mysql_data:
10 changes: 5 additions & 5 deletions docker-compose-all-ali.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -18,4 +18,4 @@ services:
- "43744:82"

volumes:
moneywhere_mysql_data:
moneynote_mysql_data:
10 changes: 5 additions & 5 deletions docker-compose-all-hub.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -18,4 +18,4 @@ services:
- "43744:82"

volumes:
moneywhere_mysql_data:
moneynote_mysql_data:
8 changes: 4 additions & 4 deletions docker-compose-all-no-mysql-ali.yml
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
8 changes: 4 additions & 4 deletions docker-compose-all-no-mysql-hub.yml
Original file line number Diff line number Diff line change
@@ -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}
Expand Down
28 changes: 14 additions & 14 deletions docker-compose-hub-no-mysql.yml
Original file line number Diff line number Diff line change
@@ -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"
Loading

0 comments on commit f9f5497

Please sign in to comment.