Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
83 lines (79 loc) · 2.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
83 lines (79 loc) · 2.04 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
services:
# Servidor web Apache + PHP
barkios-app:
build: .
container_name: barkios_app
ports:
- "${APP_PORT:-9080}:80"
volumes:
- .:/var/www/html
depends_on:
barkios-db:
condition: service_healthy
environment:
- DB_HOST=${DB_HOST}
- DB_NAME=${DB_NAME}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- APP_ENV=${APP_ENV}
- APP_DEBUG=${APP_DEBUG}
networks:
- barkios_network
restart: unless-stopped
# MySQL 8.0
barkios-db:
image: mysql:8.0
container_name: barkios_mysql
command: --sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO"
ports:
- "${DB_PORT:-4306}:3306"
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
MYSQL_DATABASE: ${DB_NAME}
MYSQL_USER: ${DB_USER}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- mysql_data:/var/lib/mysql
- ./barkios_db.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- barkios_network
restart: unless-stopped
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u${DB_USER}", "-p${DB_PASSWORD}"]
interval: 5s
timeout: 10s
retries: 5
start_period: 30s
# phpMyAdmin - VERSIÓN MEJORADA
barkios-admin:
image: phpmyadmin:latest
container_name: barkios_phpmyadmin
ports:
- "${PMA_PORT:-9000}:80"
environment:
PMA_HOST: barkios-db
PMA_PORT: 3306
PMA_USER: ${DB_USER}
PMA_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
UPLOAD_LIMIT: 300M
MEMORY_LIMIT: 512M
MAX_EXECUTION_TIME: 600
PMA_ABSOLUTE_URI: http://localhost:9000/
depends_on:
barkios-db:
condition: service_healthy
networks:
- barkios_network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost"]
interval: 10s
timeout: 5s
retries: 3
start_period: 40s
networks:
barkios_network:
driver: bridge
volumes:
mysql_data: