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
747cd7cd8e
commit
d310b695c4
10
README.md
10
README.md
@ -6,7 +6,9 @@
|
||||
|
||||
请确保本机已安装docker compose。如遇到任何问题欢迎加入 QQ群: 639653091 讨论。
|
||||
|
||||
启动前请修改docker-compose.yml数据的默认root密码,MYSQL_ROOT_PASSWORD修改为自己的密码。
|
||||
启动前请修改docker-compose.yml数据的默认root密码,MYSQL_ROOT_PASSWORD修改为自己的密码,同时修改api.env文件。
|
||||
|
||||
为防止恶意注册,请修改api.env中的邀请码。如遇端口冲突问题,请修改docker-compose.yml文件修改对应的端口。
|
||||
|
||||
```sh
|
||||
$ git clone --depth 1 https://github.com/getmoneynote/docker-compose-moneywhere.git
|
||||
@ -28,11 +30,7 @@
|
||||
|
||||
如需备份数据,请访问 [http://127.0.0.1:8085](http://127.0.0.1:8085) 打开phpMyAdmin操作,数据库是MySQL5.7。
|
||||
|
||||
phpMyAdmin登录的信息请对照api.env配置文件填写。
|
||||
|
||||
请定期使用打开phpMyAdmin导出sql文件,备份你的记账数据!!!!!!!!
|
||||
|
||||
邀请码可以在api.env文件修改 invite_code 变量,如遇端口冲突问题,请修改docker-compose.yml文件修改对应的端口。
|
||||
phpMyAdmin登录的信息请对照api.env配置文件填写。请定期使用phpMyAdmin导出sql文件,备份你的记账数据!!!!!!!!
|
||||
|
||||
## QA
|
||||
1. 很多人安装遇到数据库的问题,有可能是之前安装过,有数据文件,且自己修改过root密码。 使用 docker volume ls 命令查看有没有moneywhere_mysql_data文件,如果有,可以自己修改为另外的数据文件,或者删除moneywhere_mysql_data
|
||||
|
24
docker-compose-ali-no-mysql.yml
Normal file
24
docker-compose-ali-no-mysql.yml
Normal file
@ -0,0 +1,24 @@
|
||||
version: '3.0'
|
||||
|
||||
services:
|
||||
moneywhere-api-user:
|
||||
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"
|
56
docker-compose-ali.yml
Normal file
56
docker-compose-ali.yml
Normal file
@ -0,0 +1,56 @@
|
||||
version: '3'
|
||||
|
||||
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:
|
24
docker-compose-hub-no-mysql.yml
Normal file
24
docker-compose-hub-no-mysql.yml
Normal file
@ -0,0 +1,24 @@
|
||||
version: '3.0'
|
||||
|
||||
services:
|
||||
moneywhere-api-user:
|
||||
image: markliu2018/moneywhere-api-user:latest
|
||||
env_file: api.env
|
||||
|
||||
moneywhere-fe-user:
|
||||
links:
|
||||
- moneywhere-api-user
|
||||
image: markliu2018/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: markliu2018/moneywhere-fe-user-mobile:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
- "9098:80"
|
@ -2,13 +2,13 @@ version: '3.0'
|
||||
|
||||
services:
|
||||
moneywhere-api-user:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest
|
||||
image: markliu2018/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
|
||||
image: markliu2018/moneywhere-fe-user:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
@ -17,7 +17,7 @@ services:
|
||||
moneywhere-fe-user-mobile:
|
||||
links:
|
||||
- moneywhere-api-user
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user-mobile:latest
|
||||
image: markliu2018/moneywhere-fe-user-mobile:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
|
@ -2,21 +2,27 @@ version: '3'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
build: ./mysql/
|
||||
command: --init-file /data/1.sql
|
||||
image: mysql:5.7
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: NWPkVrO2
|
||||
MYSQL_DATABASE: moneywhere
|
||||
command: [
|
||||
'--character-set-server=utf8mb4',
|
||||
'--collation-server=utf8mb4_general_ci',
|
||||
'--max_connections=10000'
|
||||
]
|
||||
volumes:
|
||||
- moneywhere_mysql_data:/var/lib/mysql
|
||||
healthcheck:
|
||||
# test: [ "CMD", "mysqladmin" ,"ping", "-h", "localhost" ]
|
||||
test: ["CMD-SHELL", "mysqladmin ping -h localhost -uroot -pNWPkVrO2 | grep 'mysqld is alive' || exit 1"]
|
||||
# test: ["CMD-SHELL", "mysqladmin ping | grep 'Access denied' || exit 1"]
|
||||
timeout: 20s
|
||||
retries: 10
|
||||
|
||||
phpmyadmin:
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/phpmyadmin:latest
|
||||
image: phpmyadmin/phpmyadmin
|
||||
links:
|
||||
- mysql
|
||||
environment:
|
||||
@ -31,13 +37,13 @@ services:
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest
|
||||
image: markliu2018/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
|
||||
image: markliu2018/moneywhere-fe-user:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
@ -46,7 +52,7 @@ services:
|
||||
moneywhere-fe-user-mobile:
|
||||
links:
|
||||
- moneywhere-api-user
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user-mobile:latest
|
||||
image: markliu2018/moneywhere-fe-user-mobile:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
|
Loading…
Reference in New Issue
Block a user