forked from PECE-project/drupal-pece
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
137 lines (128 loc) · 3.93 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
version: '3'
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
MYSQL_PORT: $DB_PORT
volumes:
- ./docker/database/pecedb:/var/lib/mysql # Use bind mount
php:
image: wodby/drupal-php:$PHP_TAG
container_name: "${PROJECT_NAME}_php"
environment:
PHP_SENDMAIL_PATH: /usr/sbin/sendmail -t -i -S mailhog:1025
DB_HOST: $DB_HOST
DB_USER: $DB_USER
DB_PASSWORD: $DB_PASSWORD
DB_NAME: $DB_NAME
DB_DRIVER: $DB_DRIVER
PHP_FPM_USER: wodby
PHP_FPM_GROUP: wodby
COLUMNS: 80 # Set 80 columns for docker exec -it.
volumes:
- ./:/var/www/html
- $HOME/.ssh:/pece/.ssh
- $HOME/.gitconfig:/pece/.gitconfig
nginx:
image: wodby/nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
depends_on:
- php
environment:
NGINX_STATIC_OPEN_FILE_CACHE: "off"
NGINX_ERROR_LOG_LEVEL: debug
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html/build
NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET
# NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
volumes:
- ./:/var/www/html
# For macOS users (https://wodby.com/stacks/drupal/docs/local/docker-for-mac/)
# - ./:/var/www/html:cached # User-guided caching
# - docker-sync:/var/www/html # Docker-sync
labels:
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
mailhog:
image: mailhog/mailhog
container_name: "${PROJECT_NAME}_mailhog"
labels:
- 'traefik.backend=${PROJECT_NAME}_mailhog'
- 'traefik.port=8025'
- 'traefik.frontend.rule=Host:mailhog.${PROJECT_BASE_URL}'
# node:
# image: wodby/node:$NODE_TAG
# container_name: "${PROJECT_NAME}_node"
# working_dir: /var/www/html
# stdin_open: true
# tty: true
# labels:
# - 'traefik.backend=${PROJECT_NAME}_node'
# - 'traefik.port=3000'
# - 'traefik.frontend.rule=Host:front.${PROJECT_BASE_URL}'
# expose:
# - "3000"
# volumes:
# - ./:/var/www/html
# command: sh -c 'npm install && npm run build'
traefik:
image: traefik
container_name: "${PROJECT_NAME}_traefik"
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '80:80'
- '8081:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock
web:
build:
context: ./
dockerfile: ./docker/DockerfileWeb
working_dir: ${PWD}
# It's not necessary to specify a host port when using traefik.
# ports:
# - "8080:8080"
volumes:
- ${PWD}:${PWD}
- $HOME/.composer/.auth.json:$HOME/.composer/.auth.json
- ./.drush:/root/.drush
- $HOME/.ssh:/pece/.ssh
- $HOME/.gitconfig:/pece/.gitconfig
environment:
# ASDA CREDENTIALS
# By leaving these variables empty Docker Compose will set them to their host values.
DOCUMENT_ROOT: ${PWD}/build
ASDA_USER:
ASDA_PASSWORD:
QA_API_BASIC_AUTH:
QA_WEBSITE_URL:
QA_WEBSITE_TOKEN:
# XDEBUG CONFIGURATION
XDEBUG_CONFIG: remote_host=host.docker.internal remote_port=9003 remote_enable=1
PHP_IDE_CONFIG: "serverName=Docker"
# For Xdebug setup, run this command in the terminal:
# For Mac users: sudo ifconfig en0 alias 10.254.254.254 255.255.255.0
# For Linux users: sudo ip addr add 10.254.254.254/32 dev lo label lo:1
env_file:
- .env
dev:
image: revagomes/pece:php7-alpha1
container_name: "${PROJECT_NAME}_dev"
# build:
# context: ./
# dockerfile: ./docker/DockerfileDevelopment
# cap_add:
# - ALL
# restart: always
ports:
- 8098:80
working_dir: /pece/drupal
volumes:
- $PWD:/pece/drupal
- $HOME/.ssh:/pece/.ssh
- $HOME/.gitconfig:/pece/.gitconfig