mirror of
https://gitee.com/markliu2013/docker-compose-moneynote.git
synced 2024-11-17 20:58:02 +08:00
save
This commit is contained in:
parent
faa89b669d
commit
118c531f59
@ -29,10 +29,10 @@ docker-compose -f docker-compose-no-mysql.yml up -d
|
||||
```
|
||||
|
||||
|
||||
如果docker hub镜像无法访问,请使用阿里云镜像:
|
||||
默认使用阿里云镜像,适合运行在中国大陆的服务器,如果服务器在境外,推荐使用docker hub镜像:
|
||||
|
||||
```sh
|
||||
docker-compose -f docker-compose-ali.yml up -d
|
||||
docker-compose -f docker-compose-hub.yml up -d
|
||||
```
|
||||
|
||||
版本升级,使用最新镜像。
|
||||
@ -53,3 +53,6 @@ phpMyAdmin登录的信息请对照api.env配置文件填写。请定期使用php
|
||||
|
||||
## QA
|
||||
1. 很多人安装遇到数据库的问题,有可能是之前安装过,有数据文件,且自己修改过root密码。 使用 docker volume ls 命令查看有没有moneywhere_mysql_data文件,如果有,可以自己修改为另外的数据文件,或者删除moneywhere_mysql_data
|
||||
|
||||
## 参考资料
|
||||
[安装docker](https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-centos-7)
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.0'
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
moneywhere-api-user:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3'
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3.0'
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
moneywhere-api-user:
|
||||
|
@ -1,4 +1,4 @@
|
||||
version: '3'
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
|
@ -1,8 +1,8 @@
|
||||
version: '3.0'
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
moneywhere-api-user:
|
||||
image: markliu2018/moneywhere-api-user:latest
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest
|
||||
extra_hosts:
|
||||
- "host.docker.internal:host-gateway"
|
||||
env_file: api-no-mysql.env
|
||||
@ -10,7 +10,7 @@ services:
|
||||
moneywhere-fe-user:
|
||||
links:
|
||||
- moneywhere-api-user
|
||||
image: markliu2018/moneywhere-fe-user:latest
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
@ -19,7 +19,7 @@ services:
|
||||
moneywhere-fe-user-mobile:
|
||||
links:
|
||||
- moneywhere-api-user
|
||||
image: markliu2018/moneywhere-fe-user-mobile:latest
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user-mobile:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
|
@ -1,28 +1,22 @@
|
||||
version: '3'
|
||||
version: '2.1'
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
build: ./mysql/
|
||||
command: --init-file /data/1.sql
|
||||
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: phpmyadmin/phpmyadmin
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/phpmyadmin:latest
|
||||
links:
|
||||
- mysql
|
||||
environment:
|
||||
@ -37,13 +31,13 @@ services:
|
||||
depends_on:
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
image: markliu2018/moneywhere-api-user:latest
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-api-user:latest
|
||||
env_file: api.env
|
||||
|
||||
moneywhere-fe-user:
|
||||
links:
|
||||
- moneywhere-api-user
|
||||
image: markliu2018/moneywhere-fe-user:latest
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
@ -52,7 +46,7 @@ services:
|
||||
moneywhere-fe-user-mobile:
|
||||
links:
|
||||
- moneywhere-api-user
|
||||
image: markliu2018/moneywhere-fe-user-mobile:latest
|
||||
image: registry.cn-hangzhou.aliyuncs.com/moneywhere/moneywhere-fe-user-mobile:latest
|
||||
environment:
|
||||
USER_API_HOST: http://moneywhere-api-user:9092
|
||||
ports:
|
||||
|
Loading…
Reference in New Issue
Block a user