Repository navigation
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
83 lines (79 loc) · 2.7 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
83 lines (79 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
# -----------------------------------------------------------------------------
# SPDX-License-Identifier: GPL-3.0-or-later
#
# @copyright Copyright (c) 2026 Rafael Mendes
# @license GPLv3+ <https://www.gnu.org/licenses/gpl-3.0.html>
# @link GitHub <https://github.com/mendescrafael>
#
# This file is part of {Nome do projeto}.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
# -----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
# Docker Compose override para ambiente de desenvolvimento.
#
# Use este arquivo com os comandos `make build-dev` e `make up-dev`. Para ajuda,
# execute: `make help` (na raiz do projeto).
#
# Para mais informações, consulte o arquivo `README.md`.
# -----------------------------------------------------------------------------
volumes:
db_vol:
name: ${APP_NAME}-${CLIENT_ID}-${DB_SERVICE}-${APP_ENV}
services:
app:
env_file:
- .env
- .env.dev
build:
target: ${APP_ENV}
restart: no
volumes:
- ./app:${APP_DIR}:rw
db:
env_file:
- .env
- .env.dev
image: ${DB_BASE_IMG}
container_name: ${APP_NAME}-${CLIENT_ID}-db-${DB_SERVICE}-${APP_ENV}
hostname: db-${DB_SERVICE}-${APP_ENV}
restart: no
networks:
- app_net
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- TZ=${TZ}
ports:
- "${MYSQL_PORT}:${MYSQL_PORT}"
volumes:
- db_vol:${DB_DIR}:rw
- ./data/db/dumps:${DB_DUMPS_DIR}:rw
command:
--character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
--innodb_file_per_table=1
--sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 30s
timeout: 10s
retries: 3
start_period: 20s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "5"