mirror of
https://gitee.com/markliu2013/docker-compose-moneynote.git
synced 2024-11-17 12:48:03 +08:00
save
This commit is contained in:
parent
4dadc3ab33
commit
853163b06f
28
README.md
28
README.md
@ -45,11 +45,11 @@ docker run --name moneywhere -d \
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker run --name moneywhere -d \
|
docker run --name moneywhere -d \
|
||||||
-e DB_HOST=host.docker.internal \
|
-e DB_HOST=your_ip \
|
||||||
-e DB_PORT=3306 \
|
-e DB_PORT=3306 \
|
||||||
-e DB_NAME=moneywhere \
|
-e DB_NAME=moneywhere \
|
||||||
-e DB_USER=root \
|
-e DB_USER=root \
|
||||||
-e DB_PASSWORD=111111 \
|
-e DB_PASSWORD=your_password \
|
||||||
-e invite_code=111111 \
|
-e invite_code=111111 \
|
||||||
-p 43742:9092 \
|
-p 43742:9092 \
|
||||||
-p 43743:81 \
|
-p 43743:81 \
|
||||||
@ -60,11 +60,11 @@ docker run --name moneywhere -d \
|
|||||||
docker hub镜像启动(适合境外用户,此镜像无mysql服务,请将参数修改为自己的mysql服务。)
|
docker hub镜像启动(适合境外用户,此镜像无mysql服务,请将参数修改为自己的mysql服务。)
|
||||||
```sh
|
```sh
|
||||||
docker run --name moneywhere -d \
|
docker run --name moneywhere -d \
|
||||||
-e DB_HOST=host.docker.internal \
|
-e DB_HOST=your_ip \
|
||||||
-e DB_PORT=3306 \
|
-e DB_PORT=3306 \
|
||||||
-e DB_NAME=moneywhere \
|
-e DB_NAME=moneywhere \
|
||||||
-e DB_USER=root \
|
-e DB_USER=root \
|
||||||
-e DB_PASSWORD=111111 \
|
-e DB_PASSWORD=your_password \
|
||||||
-e invite_code=111111 \
|
-e invite_code=111111 \
|
||||||
-p 43742:9092 \
|
-p 43742:9092 \
|
||||||
-p 43743:81 \
|
-p 43743:81 \
|
||||||
@ -72,7 +72,7 @@ docker run --name moneywhere -d \
|
|||||||
markliu2018/moneywhere-all-no-mysql:latest
|
markliu2018/moneywhere-all-no-mysql:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### docker compose 启动
|
### docker compose 启动(推荐)
|
||||||
|
|
||||||
1. 请下载本项目源代码,使用git命令或直接下载源代码。
|
1. 请下载本项目源代码,使用git命令或直接下载源代码。
|
||||||
|
|
||||||
@ -157,46 +157,44 @@ docker compose --env-file api-no-mysql.env -f docker-compose-ali-no-mysql.yml pu
|
|||||||
|
|
||||||
docker 5 in 1 hub 启动
|
docker 5 in 1 hub 启动
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-hub.yml up -d
|
docker compose --env-file api.env -f docker-compose-all-hub.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
docker 5 in 1 hub 升级
|
docker 5 in 1 hub 升级
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-hub.yml pull && docker compose -f docker-compose-all-hub.yml up -d
|
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 启动
|
docker 3 in 1 hub 启动
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-no-mysql-hub.yml up -d
|
docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-hub.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
docker 3 in 1 hub 升级
|
docker 3 in 1 hub 升级
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-hub.yml pull && docker compose -f docker-compose-all-no-mysql-hub.yml up -d
|
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
|
```sh
|
||||||
docker compose -f docker-compose-all-ali.yml up -d
|
docker compose --env-file api.env -f docker-compose-all-ali.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
阿里云 docker 5 in 1 升级
|
阿里云 docker 5 in 1 升级
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-ali.yml pull && docker compose -f docker-compose-all-ali.yml up -d
|
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
|
```sh
|
||||||
docker compose -f docker-compose-all-no-mysql-ali.yml up -d
|
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
|
```sh
|
||||||
docker compose -f docker-compose-all-ali.yml pull && docker compose -f docker-compose-all-no-mysql-ali.yml up -d
|
docker compose -f docker-compose-all-ali.yml pull && docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-ali.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
## QA
|
## QA
|
||||||
1. 很多人安装遇到数据库的问题,有可能是之前安装过,有数据文件,且自己修改过root密码。 使用 docker volume ls 命令查看有没有moneywhere_mysql_data文件,如果有,可以自己修改为另外的数据文件,或者删除moneywhere_mysql_data
|
1. 很多人安装遇到数据库的问题,有可能是之前安装过,有数据文件,且自己修改过root密码。 使用 docker volume ls 命令查看有没有moneywhere_mysql_data文件,如果有,可以自己修改为另外的数据文件,或者删除moneywhere_mysql_data
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@ DB_HOST=host.docker.internal
|
|||||||
DB_PORT=3306
|
DB_PORT=3306
|
||||||
DB_NAME=moneywhere
|
DB_NAME=moneywhere
|
||||||
DB_USER=root
|
DB_USER=root
|
||||||
DB_PASSWORD=111111
|
DB_PASSWORD=78p7gkc1
|
||||||
invite_code=111111
|
invite_code=111111
|
6
api.env
6
api.env
@ -1,6 +1,2 @@
|
|||||||
DB_HOST=mysql
|
DB_PASSWORD=78p7gkc1
|
||||||
DB_PORT=3306
|
|
||||||
DB_NAME=moneywhere
|
|
||||||
DB_USER=root
|
|
||||||
DB_PASSWORD=111111
|
|
||||||
invite_code=111111
|
invite_code=111111
|
@ -7,7 +7,13 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
env_file: api-no-mysql.env
|
environment:
|
||||||
|
- DB_HOST=${DB_HOST:-host.docker.internal}
|
||||||
|
- DB_PORT=${DB_PORT:-3306}
|
||||||
|
- DB_NAME=${DB_NAME:-moneywhere}
|
||||||
|
- DB_USER=${DB_USER:-root}
|
||||||
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
|
- invite_code=${invite_code:-111111}
|
||||||
ports:
|
ports:
|
||||||
- "43742:9092"
|
- "43742:9092"
|
||||||
|
|
||||||
|
@ -4,17 +4,13 @@ services:
|
|||||||
mysql:
|
mysql:
|
||||||
container_name: moneywhere_mysql
|
container_name: moneywhere_mysql
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/mysql8:latest
|
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/mysql8:latest
|
||||||
env_file:
|
|
||||||
- api.env
|
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
- MYSQL_DATABASE=${DB_NAME}
|
- MYSQL_DATABASE=moneywhere
|
||||||
command: [
|
command: [
|
||||||
'--character-set-server=utf8mb4',
|
'--character-set-server=utf8mb4',
|
||||||
'--collation-server=utf8mb4_general_ci',
|
'--collation-server=utf8mb4_general_ci',
|
||||||
'--max_connections=10000',
|
|
||||||
'--default-authentication-plugin=mysql_native_password'
|
|
||||||
]
|
]
|
||||||
volumes:
|
volumes:
|
||||||
- moneywhere_mysql_data:/var/lib/mysql
|
- moneywhere_mysql_data:/var/lib/mysql
|
||||||
@ -38,7 +34,13 @@ services:
|
|||||||
- mysql
|
- mysql
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest
|
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest
|
||||||
restart: always
|
restart: always
|
||||||
env_file: api.env
|
environment:
|
||||||
|
- DB_HOST=mysql
|
||||||
|
- DB_PORT=3306
|
||||||
|
- DB_NAME=moneywhere
|
||||||
|
- DB_USER=root
|
||||||
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
|
- invite_code=${invite_code:-111111}
|
||||||
ports:
|
ports:
|
||||||
- "43742:9092"
|
- "43742:9092"
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ services:
|
|||||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all:latest
|
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all:latest
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
- DB_PASSWORD=78p7gkc1
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
- invite_code=111111
|
- invite_code=${invite_code:-111111}
|
||||||
volumes:
|
volumes:
|
||||||
- moneywhere_mysql_data:/var/lib/mysql
|
- moneywhere_mysql_data:/var/lib/mysql
|
||||||
ports:
|
ports:
|
||||||
|
@ -5,13 +5,15 @@ services:
|
|||||||
container_name: moneywhere
|
container_name: moneywhere
|
||||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all-no-mysql:latest
|
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-all-no-mysql:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=${DB_HOST}
|
- DB_HOST=${DB_HOST:-host.docker.internal}
|
||||||
- DB_PORT=${DB_PORT}
|
- DB_PORT=${DB_PORT:-3306}
|
||||||
- DB_NAME=${DB_NAME}
|
- DB_NAME=${DB_NAME:-moneywhere}
|
||||||
- DB_USER=${DB_USER}
|
- DB_USER=${DB_USER:-root}
|
||||||
- DB_PASSWORD=${DB_PASSWORD}
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
- invite_code=${invite_code}
|
- invite_code=${invite_code:-111111}
|
||||||
ports:
|
ports:
|
||||||
- "43742:9092"
|
- "43742:9092"
|
||||||
- "43743:81"
|
- "43743:81"
|
||||||
|
@ -5,13 +5,15 @@ services:
|
|||||||
container_name: moneywhere
|
container_name: moneywhere
|
||||||
image: markliu2018/moneywhere-all-no-mysql:latest
|
image: markliu2018/moneywhere-all-no-mysql:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=host.docker.internal
|
- DB_HOST=${DB_HOST:-host.docker.internal}
|
||||||
- DB_PORT=3306
|
- DB_PORT=${DB_PORT:-3306}
|
||||||
- DB_NAME=moneywhere
|
- DB_NAME=${DB_NAME:-moneywhere}
|
||||||
- DB_USER=root
|
- DB_USER=${DB_USER:-root}
|
||||||
- DB_PASSWORD=111111
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
- invite_code=111111
|
- invite_code=${invite_code:-111111}
|
||||||
ports:
|
ports:
|
||||||
- "43742:9092"
|
- "43742:9092"
|
||||||
- "43743:81"
|
- "43743:81"
|
||||||
|
@ -7,7 +7,13 @@ services:
|
|||||||
restart: always
|
restart: always
|
||||||
extra_hosts:
|
extra_hosts:
|
||||||
- "host.docker.internal:host-gateway"
|
- "host.docker.internal:host-gateway"
|
||||||
env_file: api-no-mysql.env
|
environment:
|
||||||
|
- DB_HOST=${DB_HOST:-host.docker.internal}
|
||||||
|
- DB_PORT=${DB_PORT:-3306}
|
||||||
|
- DB_NAME=${DB_NAME:-moneywhere}
|
||||||
|
- DB_USER=${DB_USER:-root}
|
||||||
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
|
- invite_code=${invite_code:-111111}
|
||||||
ports:
|
ports:
|
||||||
- "43742:9092"
|
- "43742:9092"
|
||||||
|
|
||||||
|
@ -4,16 +4,13 @@ services:
|
|||||||
mysql:
|
mysql:
|
||||||
container_name: moneywhere_mysql
|
container_name: moneywhere_mysql
|
||||||
image: mysql:8.0
|
image: mysql:8.0
|
||||||
env_file: api.env
|
|
||||||
restart: always
|
restart: always
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
|
- MYSQL_ROOT_PASSWORD= ${DB_PASSWORD:-78p7gkc1}
|
||||||
MYSQL_DATABASE: ${DB_NAME}
|
- MYSQL_DATABASE= moneywhere
|
||||||
command: [
|
command: [
|
||||||
'--character-set-server=utf8mb4',
|
'--character-set-server=utf8mb4',
|
||||||
'--collation-server=utf8mb4_general_ci',
|
'--collation-server=utf8mb4_general_ci',
|
||||||
'--max_connections=10000',
|
|
||||||
'--default-authentication-plugin=mysql_native_password'
|
|
||||||
]
|
]
|
||||||
volumes:
|
volumes:
|
||||||
- moneywhere_mysql_data:/var/lib/mysql
|
- moneywhere_mysql_data:/var/lib/mysql
|
||||||
@ -37,7 +34,13 @@ services:
|
|||||||
- mysql
|
- mysql
|
||||||
image: markliu2018/moneywhere-api-user:latest
|
image: markliu2018/moneywhere-api-user:latest
|
||||||
restart: always
|
restart: always
|
||||||
env_file: api.env
|
environment:
|
||||||
|
- DB_HOST=mysql
|
||||||
|
- DB_PORT=3306
|
||||||
|
- DB_NAME=moneywhere
|
||||||
|
- DB_USER=root
|
||||||
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
|
- invite_code=${invite_code:-111111}
|
||||||
ports:
|
ports:
|
||||||
- "43742:9092"
|
- "43742:9092"
|
||||||
|
|
||||||
|
@ -5,13 +5,15 @@ services:
|
|||||||
container_name: moneywhere
|
container_name: moneywhere
|
||||||
image: markliu2018/moneywhere-all-no-mysql:latest
|
image: markliu2018/moneywhere-all-no-mysql:latest
|
||||||
restart: always
|
restart: always
|
||||||
|
extra_hosts:
|
||||||
|
- "host.docker.internal:host-gateway"
|
||||||
environment:
|
environment:
|
||||||
- DB_HOST=host.docker.internal
|
- DB_HOST=${DB_HOST:-host.docker.internal}
|
||||||
- DB_PORT=3306
|
- DB_PORT=${DB_PORT:-3306}
|
||||||
- DB_NAME=moneywhere
|
- DB_NAME=${DB_NAME:-moneywhere}
|
||||||
- DB_USER=root
|
- DB_USER=${DB_USER:-root}
|
||||||
- DB_PASSWORD=111111
|
- DB_PASSWORD=${DB_PASSWORD:-78p7gkc1}
|
||||||
- invite_code=111111
|
- invite_code=${invite_code:-111111}
|
||||||
ports:
|
ports:
|
||||||
- "43742:9092"
|
- "43742:9092"
|
||||||
- "43743:81"
|
- "43743:81"
|
||||||
|
18
notes.txt
18
notes.txt
@ -40,44 +40,44 @@ docker compose --env-file api-no-mysql.env -f docker-compose-ali-no-mysql.yml pu
|
|||||||
|
|
||||||
docker 5 in 1 hub 启动
|
docker 5 in 1 hub 启动
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-hub.yml up -d
|
docker compose --env-file api.env -f docker-compose-all-hub.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
docker 5 in 1 hub 升级
|
docker 5 in 1 hub 升级
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-hub.yml pull && docker compose -f docker-compose-all-hub.yml up -d
|
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 启动
|
docker 3 in 1 hub 启动
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-no-mysql-hub.yml up -d
|
docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-hub.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
docker 3 in 1 hub 升级
|
docker 3 in 1 hub 升级
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-hub.yml pull && docker compose -f docker-compose-all-no-mysql-hub.yml up -d
|
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
|
```sh
|
||||||
docker compose -f docker-compose-all-ali.yml up -d
|
docker compose --env-file api.env -f docker-compose-all-ali.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
阿里云 docker 5 in 1 升级
|
阿里云 docker 5 in 1 升级
|
||||||
```sh
|
```sh
|
||||||
docker compose -f docker-compose-all-ali.yml pull && docker compose -f docker-compose-all-ali.yml up -d
|
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
|
```sh
|
||||||
docker compose -f docker-compose-all-no-mysql-ali.yml up -d
|
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
|
```sh
|
||||||
docker compose -f docker-compose-all-ali.yml pull && docker compose -f docker-compose-all-no-mysql-ali.yml up -d
|
docker compose -f docker-compose-all-ali.yml pull && docker compose --env-file api-no-mysql.env -f docker-compose-all-no-mysql-ali.yml up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
78p7gkc1
|
78p7gkc1
|
||||||
ALTER USER 'root'@'%' IDENTIFIED BY '111111';
|
ALTER USER 'root'@'%' IDENTIFIED BY '111111';
|
Loading…
Reference in New Issue
Block a user