-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
49 lines (46 loc) · 1.29 KB
/
docker-compose.yml
File metadata and controls
49 lines (46 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
# Local development stack. Copy docker-compose.env.example to .env
# before `docker compose up` so MySQL credentials are not hard-coded.
services:
nginx:
build:
context: ./docker/nginx
volumes:
- ./:/var/www/rxn
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./docker/nginx/sites-available/:/etc/nginx/sites-available
- ./docker/nginx/conf.d/:/etc/nginx/conf.d
ports:
- "8080:80"
depends_on:
- php
php:
build:
context: ./docker/php
args:
INSTALL_XDEBUG: "${INSTALL_XDEBUG:-0}"
volumes:
- ./:/var/www/rxn
environment:
PHP_IDE_CONFIG: "serverName=rxn"
depends_on:
mysql:
condition: service_healthy
mysql:
build:
context: ./docker/mysql
ports:
- "3306:3306"
environment:
MYSQL_DATABASE: "${MYSQL_DATABASE:-rxn_app}"
MYSQL_USER: "${MYSQL_USER:-app_user}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD:?MYSQL_PASSWORD must be set in .env}"
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD:?MYSQL_ROOT_PASSWORD must be set in .env}"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-p$$MYSQL_ROOT_PASSWORD"]
interval: 5s
timeout: 5s
retries: 10
volumes:
- mysql_data:/var/lib/mysql
volumes:
mysql_data: