-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (78 loc) · 2.25 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (78 loc) · 2.25 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
82
83
84
# itk-version: 2.0.0
version: "3"
networks:
frontend:
external: true
app:
driver: bridge
internal: false
services:
mariadb:
image: itkdev/mariadb:latest
networks:
- app
ports:
- '3306'
environment:
- MYSQL_ROOT_PASSWORD=password
- MYSQL_USER=db
- MYSQL_PASSWORD=db
- MYSQL_DATABASE=db
#- ENCRYPT=1 # Uncomment to enable database encryption.
phpfpm:
image: itkdev/php5.6-fpm:latest
networks:
- app
environment:
- PHP_XDEBUG=${PHP_XDEBUG:-0}
- PHP_XDEBUG_REMOTE_AUTOSTART=${PHP_XDEBUG_REMOTE_AUTOSTART:-0}
- PHP_XDEBUG_REMOTE_CONNECT_BACK=${PHP_XDEBUG_REMOTE_CONNECT_BACK:-0}
- PHP_MAX_EXECUTION_TIME=30
- PHP_MEMORY_LIMIT=256M
# - PHP_MAIL=1 # Uncomment to enable mailhog.
- DOCKER_HOST_DOMAIN=${COMPOSE_DOMAIN}
- COMPOSER_VERSION=1
depends_on:
- mariadb
volumes:
- nfsApp:/app:delegated
nginx:
image: nginx:latest
networks:
- app
- frontend
depends_on:
- phpfpm
ports:
- '80'
volumes:
- ${PWD}/.docker/vhost.conf:/etc/nginx/conf.d/default.conf:ro
- nfsApp:/app:delegated
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}.rule=Host(`${COMPOSE_DOMAIN}`)"
mailhog:
image: mailhog/mailhog
networks:
- app
- frontend
ports:
- "1025"
- "8025"
labels:
- "traefik.enable=true"
- "traefik.docker.network=frontend"
- "traefik.http.routers.${COMPOSE_PROJECT_NAME}Mailhog.rule=Host(`mailhog-${COMPOSE_DOMAIN}`)"
- "traefik.http.services.${COMPOSE_PROJECT_NAME}Mailhog.loadbalancer.server.port=8025"
volumes:
# Named volume requires that you have NFS shares enabled (performance boost on Macs).
# Use `itkdev-docker-compose nfs:enable` to enable NFS shares. If you don't want to use it remove it from here and
# change the volume mapping to use normal shares in the containers. See
# https://sean-handley.medium.com/how-to-set-up-docker-for-mac-with-native-nfs-145151458adc
nfsApp:
driver: local
driver_opts:
type: nfs
o: addr=host.docker.internal,rw,nolock,hard,nointr,nfsvers=3
device: ":$PWD"