-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
81 lines (77 loc) · 2.08 KB
/
docker-compose.yml
File metadata and controls
81 lines (77 loc) · 2.08 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
version: "3.8"
services:
php-docker-template-php:
image: php-docker-template-php
container_name: php-docker-template-php
build:
context: ./docker/php
dockerfile: Dockerfile
args:
PHP_VERSION: 8.0.10
XDEBUG_VERSION: 3.1.2
COMPOSER_VERSION: 2.1.14
volumes:
- type: volume
source: php-docker-template-fpm-socket
target: /var/run/php-fpm
volume:
nocopy: true
- type: bind
source: ./src/
target: /var/www/html
- type: bind
source: ./docker/php/php.ini-production
target: /usr/local/etc/php/conf.d/php.ini
# Override `/usr/local/etc/php-fpm.d/zz-docker.conf` configuration in
# Docker container.
# See: https://github.com/docker-library/php/issues/241
- type: bind
source: ./docker/php/zzz-docker-override.conf
target: /usr/local/etc/php-fpm.d/zzz-docker-override.conf
networks:
- php-docker-template-network
env_file: ./docker/php/.env
ulimits:
memlock:
soft: -1
hard: -1
php-docker-template-nginx:
image: php-docker-template-nginx
container_name: php-docker-template-nginx
build:
context: ./docker/nginx
dockerfile: Dockerfile
args:
NGINX_VERSION: 1.21.1
volumes:
- type: volume
source: php-docker-template-fpm-socket
target: /var/run/php-fpm
volume:
nocopy: true
- type: bind
source: ./docker/nginx/nginx.conf
target: /etc/nginx/nginx.conf
read_only: true
- type: bind
source: ./docker/nginx/default.conf
target: /etc/nginx/conf.d/default.conf
read_only: true
ports:
- "80:80"
networks:
- php-docker-template-network
env_file: ./docker/nginx/.env
ulimits:
memlock:
soft: -1
hard: -1
depends_on:
- php-docker-template-php
networks:
php-docker-template-network:
name: php-docker-template-network
driver: bridge
volumes:
# For sharing php-fpm socket.
php-docker-template-fpm-socket: