-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
68 lines (64 loc) · 2.08 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
services:
# nginx
p5-web:
build:
context: .docker/nginx
dockerfile: Dockerfile
container_name: p5-web
ports:
- "80:80"
- "443:443"
volumes:
- ./src:/var/www
- ./src/storage/logs/nginx:/var/log/nginx:delegated
- ./.docker/nginx/nginx.conf:/etc/nginx/nginx.conf:cached
- ./.docker/nginx/conf.d/default.conf:/etc/nginx/conf.d/default.conf:cached
- ./.docker/nginx/conf.d/gzip.conf:/etc/nginx/conf.d/gzip.conf:cached
- ./.docker/nginx/certs:/etc/ssl/certs:cached
- ./.docker/nginx/sites-enabled:/etc/nginx/sites-enabled:cached
- ./.docker/nginx/snippets:/etc/nginx/snippets:cached
- ./.docker/nginx/templates:/etc/nginx/templates:cached
env_file:
- .nginx.env
depends_on:
- p5-app
- p5-db
networks:
- backend
# php
p5-app:
build:
context: .docker
dockerfile: php/Dockerfile
container_name: p5-app
environment:
XDEBUG_IDEKEY: PHPSTORM
XDEBUG_REMOTE_PORT: 9003 # https://xdebug.org/docs/upgrade_guide#Step-Debugging
XDEBUG_REMOTE_HOST: host.docker.internal
ports:
- "9000:9000"
volumes:
- ./src:/var/www
- ~/composer:/root/.composer
depends_on:
- p5-db
networks:
- backend
# database (mariadb)
p5-db:
image: mariadb:latest
container_name: p5-db
ports:
- "3307:3306"
volumes:
- ./.docker/mysql/cnf:/etc/mysql/conf.d
- ./.docker/mysql/database:/var/lib/mysql
- ./.docker/mysql/dump.sql:/docker-entrypoint-initdb.d/dump.sql
command: --default-authentication-plugin=mysql_native_password --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
restart: always
env_file:
- .sql.env
networks:
- backend
networks:
backend: