-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
70 lines (64 loc) · 1.32 KB
/
docker-compose.yml
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
version: "3.8"
# Services
services:
# Nginx Service
nginx:
image: nginx:1.19
ports:
- 8000:80
volumes:
- ./:/var/www/php
- ./docker/nginx/conf.d:/etc/nginx/conf.d
depends_on:
- php
# PHP Service
php:
build: ./docker/php
working_dir: /var/www/php
volumes:
- ./:/var/www/php
environment:
DB_NAME: db
DB_HOST: mysql
DB_USER: sven
DB_PASSWORD: opportunity
depends_on:
mysql:
condition: service_healthy
# MySQL Service
mysql:
image: mysql
environment:
MYSQL_DATABASE: db
MYSQL_USER: sven
MYSQL_PASSWORD: opportunity
MYSQL_ROOT_PASSWORD: opportunity
MYSQL_PORT: 3336
container_name: mysql
ports:
- '3336:3306'
expose:
- '3336'
volumes:
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- db_data:/var/lib/mysql
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
interval: 5s
retries: 10
# phpmyadmin Service
phpmyadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_USER: sven
PMA_PASSWORD: opportunity
ports:
- 8080:80
depends_on:
- mysql
volumes:
db_data:
driver: local