-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
55 lines (51 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
55 lines (51 loc) · 1.29 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
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
mongodb:
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
mongodb:
image: mongo:latest
healthcheck:
test: echo 'db.runCommand("ping").ok' | mongosh localhost:27017/test --quiet
volumes:
- mongodb_data:/data/db:rw
restart: always
environment:
MONGODB_INITDB_DATABASE: app
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: example
nginx:
build: docker/nginx
ports:
- "9000:80"
volumes:
- ./:/app #required if files other than index.php need to be available
depends_on:
- php
volumes:
mysql:
mongodb_data: