Compare commits
2 Commits
b9c23e32ec
...
03a0809c6a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
03a0809c6a | ||
|
|
07be06d258 |
@@ -5,7 +5,6 @@ version: "3.7"
|
|||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
||||||
# ===== KRAYIN CRM =====
|
# ===== KRAYIN CRM =====
|
||||||
crm:
|
crm:
|
||||||
image: gitea.blyzer.com.br/blyzer/growup-crm:latest
|
image: gitea.blyzer.com.br/blyzer/growup-crm:latest
|
||||||
@@ -61,7 +60,7 @@ services:
|
|||||||
- node.role == manager
|
- node.role == manager
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpus: '1'
|
cpus: "1"
|
||||||
memory: 1024M
|
memory: 1024M
|
||||||
command:
|
command:
|
||||||
[
|
[
|
||||||
@@ -71,20 +70,35 @@ services:
|
|||||||
"--default-authentication-plugin=mysql_native_password",
|
"--default-authentication-plugin=mysql_native_password",
|
||||||
"--max-allowed-packet=512MB",
|
"--max-allowed-packet=512MB",
|
||||||
"--expire_logs_days=7",
|
"--expire_logs_days=7",
|
||||||
"--max_binlog_size=100M"
|
"--max_binlog_size=100M",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# ===== BACKUP MYSQL =====
|
||||||
|
backup-mysql:
|
||||||
|
image: fradelg/mysql-cron-backup
|
||||||
|
deploy:
|
||||||
|
replicas: 1
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.role == manager
|
||||||
|
environment:
|
||||||
|
MYSQL_HOST: mysql
|
||||||
|
MYSQL_USER: root
|
||||||
|
MYSQL_PASS: ${DB_PASSWORD}
|
||||||
|
CRON_TIME: "55 2 * * *" # Roda todo dia exatamente às 02:55 da manhã
|
||||||
|
MAX_BACKUPS: 3 # Mantém apenas os 3 últimos dias
|
||||||
|
INIT_BACKUP: "1" # Faz um backup imediatamente ao ligar o container
|
||||||
|
volumes:
|
||||||
|
- /opt/backups_db:/backup
|
||||||
|
networks:
|
||||||
|
- network_public
|
||||||
|
|
||||||
# ===== REDIS =====
|
# ===== REDIS =====
|
||||||
redis:
|
redis:
|
||||||
image: redis:latest
|
image: redis:latest
|
||||||
command:
|
command: ["redis-server", "--appendonly", "yes", "--port", "6379"]
|
||||||
[
|
|
||||||
"redis-server",
|
|
||||||
"--appendonly",
|
|
||||||
"yes",
|
|
||||||
"--port",
|
|
||||||
"6379"
|
|
||||||
]
|
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
Reference in New Issue
Block a user