-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
95 lines (88 loc) · 2.83 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
version: "3.8"
services:
mariadb:
image: wodby/mariadb:$MARIADB_TAG
container_name: "${PROJECT_NAME}_mariadb"
stop_grace_period: 30s
restart: always
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/data/pecev1:/var/lib/mysql # Use bind mount
php:
image: wodby/drupal-php:$PHP_TAG
restart: always
container_name: "${PROJECT_NAME}_php"
environment:
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:
- ./pece-distro:/var/www/html
nginx:
image: wodby/nginx:$NGINX_TAG
container_name: "${PROJECT_NAME}_nginx"
restart: always
depends_on:
- php
environment:
NGINX_BACKEND_HOST: php
NGINX_SERVER_ROOT: /var/www/html
NGINX_VHOST_PRESET: $NGINX_VHOST_PRESET
# NGINX_DRUPAL_FILE_PROXY_URL: http://example.com
volumes:
- ./pece-distro:/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.enable=true"
- "traefik.http.routers.${PROJECT_NAME}_nginx.entrypoints=http,https"
- "traefik.http.routers.${PROJECT_NAME}_nginx.rule=Host(`${PROJECT_BASE_URL}`)"
- "traefik.http.services.${PROJECT_NAME}_nginx.loadbalancer.server.port=80"
traefik:
image: traefik:v3.2.0
restart: always
container_name: "${PROJECT_NAME}_traefik"
command: --api.insecure=true --providers.docker
security_opt:
- no-new-privileges:true
ports:
- '80:80'
- '443:443'
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik.entrypoints=http,https"
- "traefik.http.routers.traefik.rule=Host(`traefik.${PROJECT_BASE_URL}`)"
- "traefik.http.services.traefik.loadbalancer.server.port=8080"
volumes:
- /etc/localtime:/etc/localtime:ro
- /var/run/docker.sock:/var/run/docker.sock:ro
# solr:
# image: wodby/solr:$SOLR_TAG
# container_name: "${PROJECT_NAME}_solr"
# environment:
# SOLR_DEFAULT_CONFIG_SET: $SOLR_CONFIG_SET
# SOLR_HEAP: 1024m
# labels:
# - 'traefik.backend=${PROJECT_NAME}_solr'
# - 'traefik.port=8983'
# - 'traefik.frontend.rule=Host:solr.${PROJECT_BASE_URL}'
# elasticsearch:
# image: wodby/elasticsearch:$ELASTICSEARCH_TAG
# container_name: "${PROJECT_NAME}_elasticsearch"
# environment:
# ES_JAVA_OPTS: "-Xms500m -Xmx500m"
# ulimits:
# memlock:
# soft: -1
# hard: -1