-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
50 lines (44 loc) · 1.2 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
version: "3.8"
services:
database:
image: mysql
container_name: mysql-container
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
volumes:
- db-data:/var/lib/mysql
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "example"
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
MYSQL_ROOT_HOST: '%'
maildev:
image: maildev/maildev
container_name: maildev-container
command: bin/maildev --web 80 --smtp 25 --hide-extensions STARTTLS
ports:
- "8081:80"
php:
build:
context: .
container_name: php-container
volumes:
- ./:/var/www/exemple
- .docker/php/custom-xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
ports:
- "9000:9000"
environment:
DATABASE_URL: mysql://root:@localhost:3306/exemple?serverVersion=${MYSQL_VERSION:-13}
nginx:
image: nginx:stable-alpine
container_name: nginx-container
ports:
- "8000:80"
volumes:
- ./:/var/www/exemple
- .docker/nginx/dev.conf:/etc/nginx/conf.d/default.conf
depends_on:
- php
- database
volumes:
db-data: