version: '3.7'
services:
services:
dev_mysql:
image: mysql:8.0.16
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_DATABASE='dev_mysql'
- MYSQL_USER='user'
- MYSQL_PASSWORD='password'
- MYSQL_ROOT_PASSWORD='xxxxxxxxxxxxxxx'
- REPLICA={{.Task.Slot}}
ports:
- 3355:3306
networks:
- crm_network
deploy:
replicas: 6
restart_policy:
condition: any
update_config:
parallelism: 1
delay: 10s
order: start-first
resources:
limits:
memory: 2048M
cpus: "2"
networks:
crm_network:
external: true
image: mysql:8.0.16
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_DATABASE='dev_mysql'
- MYSQL_USER='user'
- MYSQL_PASSWORD='password'
- MYSQL_ROOT_PASSWORD='xxxxxxxxxxxxxxx'
- REPLICA={{.Task.Slot}}
ports:
- 3355:3306
networks:
- crm_network
deploy:
replicas: 6
restart_policy:
condition: any
update_config:
parallelism: 1
delay: 10s
order: start-first
resources:
limits:
memory: 2048M
cpus: "2"
networks:
crm_network:
external: true
#LISTID=$(docker ps -q) && for i in $LISTID; do (docker exec -it $i "env" | grep REPLICA); done
REPLICA=5
REPLICA=2
REPLICA=4
REPLICA=6
REPLICA=3
REPLICA=1