-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (69 loc) · 1.66 KB
/
docker-compose.yml
File metadata and controls
73 lines (69 loc) · 1.66 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
services:
db:
image: mysql:8.0
container_name: cybertech_mysql
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: RootPassword123!
MYSQL_DATABASE: cybertech_services
MYSQL_USER: cybertech_user
MYSQL_PASSWORD: SecurePassword123!
volumes:
- db_data:/var/lib/mysql
- ./database/schema.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
ports:
- "3306:3306"
networks:
- cybertech_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-pRootPassword123!"]
interval: 10s
timeout: 5s
retries: 5
web:
build:
context: .
dockerfile: Dockerfile
container_name: cybertech_web
restart: unless-stopped
ports:
- "8080:80"
volumes:
- ./src:/var/www/html:ro
- ./src/includes/config.php:/var/www/html/includes/config.php:rw
depends_on:
db:
condition: service_healthy
networks:
- cybertech_network
environment:
- DB_HOST=db
- DB_NAME=cybertech_services
- DB_USER=cybertech_user
- DB_PASSWORD=SecurePassword123!
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 30s
timeout: 10s
retries: 3
phpmyadmin:
image: phpmyadmin:latest
container_name: cybertech_phpmyadmin
restart: unless-stopped
ports:
- "8081:80"
environment:
PMA_HOST: db
PMA_PORT: 3306
PMA_USER: cybertech_user
PMA_PASSWORD: SecurePassword123!
depends_on:
- db
networks:
- cybertech_network
networks:
cybertech_network:
driver: bridge
volumes:
db_data:
driver: local