-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (37 loc) · 921 Bytes
/
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
services:
php:
build: docker/php
user: ${HOST_UID-1000}:${HOST_GID-1000}
working_dir: /app
volumes:
- ./:/app
- ~/.composer/cache:/tmp/composer_cache
environment:
COMPOSER_AUTH:
COMPOSER_CACHE_DIR: /tmp/composer_cache
COMPOSER_MEMORY_LIMIT: -1
depends_on:
mysql:
condition: service_healthy
mysql:
build: docker/mysql
volumes:
- mysql:/var/lib/mysql:rw
- ./docker/mysql/conf.d/my.cnf:/etc/mysql/conf.d/my.cnf
- ./docker/mysql/init:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=0000
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 1s
retries: 5
nginx:
build: docker/nginx
volumes:
- ./:/app #required if files other than index.php need to be available
ports:
- "8000:80"
depends_on:
- php
volumes:
mysql: