mirror of
https://gitee.com/markliu2013/docker-compose-moneynote.git
synced 2024-11-17 20:58:02 +08:00
62 lines
1.5 KiB
YAML
62 lines
1.5 KiB
YAML
version: '3'
|
|
|
|
services:
|
|
mysql:
|
|
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: phpmyadmin/phpmyadmin
|
|
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: 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"
|
|
|
|
volumes:
|
|
moneywhere_mysql_data: |