This repository has been archived by the owner on Feb 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdocker-compose.yml
132 lines (123 loc) · 3.55 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
version: "2"
services:
apache:
container_name: "${PROJECT_NAME}_apache"
image: wodby/apache:$APACHE_TAG
depends_on:
- php
environment:
APACHE_LOG_LEVEL: info
APACHE_BACKEND_HOST: php
APACHE_DOCUMENT_ROOT: /var/www/html/web
APACHE_SERVER_TOKENS: Prod
APACHE_VHOST_PRESET: agid
labels:
- 'traefik.enable=true'
- 'traefik.backend=${PROJECT_NAME}_apache'
- 'traefik.port=80'
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}'
volumes:
- $PROJECT_DOCROOT:/var/www/html
- ${PWD}/docker-conf/agid.conf.tmpl:/etc/gotpl/presets/agid.conf.tmpl
networks:
- app-tier
database:
container_name: "${PROJECT_NAME}_database"
image: wodby/mariadb:$MARIADB_TAG
stop_grace_period: 30s
env_file:
- docker-conf/mariadb.env
environment:
MYSQL_ROOT_PASSWORD: $DB_ROOT_PASSWORD
MYSQL_DATABASE: $DB_NAME
MYSQL_USER: $DB_USER
MYSQL_PASSWORD: $DB_PASSWORD
networks:
- app-tier
volumes:
- databasevol:/var/lib/mysql
php:
container_name: "${PROJECT_NAME}_php"
image: wodby/php:$PHP_TAG
env_file:
- docker-conf/phpfpm.env
environment:
ENV_TYPE: 'PROD'
COLUMNS: 80 # Set 80 columns for docker exec -it.
PHP_FPM_CLEAR_ENV: "no"
MYSQL_DATABASE: $DB_NAME
MYSQL_HOSTNAME: $DB_HOST
MYSQL_PASSWORD: $DB_PASSWORD
MYSQL_PORT: $DB_PORT
MYSQL_USER: $DB_USER
DRUPAL_HASH_SALT: $DRUPAL_HASH_SALT
volumes:
- $PROJECT_DOCROOT:/var/www/html
networks:
- app-tier
redis:
container_name: "${PROJECT_NAME}_redis"
image: wodby/redis:$REDIS_TAG
env_file:
- docker-conf/redis.env
networks:
- app-tier
solr:
container_name: "${PROJECT_NAME}_solr"
image: wodby/solr:$SOLR_TAG
environment:
SOLR_DEFAULT_CONFIG_SET: $SOLR_CONFIG_SET
SOLR_HEAP: 1024m
volumes:
- ./docker-conf/solr_7.x_config:/opt/docker-solr/configsets/agid/conf
labels:
- 'traefik.enable=true'
- 'traefik.backend=${PROJECT_NAME}_solr'
- 'traefik.port=8983'
- 'traefik.frontend.rule=Host:solr.${PROJECT_BASE_URL}'
networks:
- app-tier
traefik:
container_name: "${PROJECT_NAME}_traefik"
image: traefik:v1.7
command: |-
--api
#--api.dashboard=true
--debug=false
--loglevel=ERROR
--retry
--defaultentrypoints=http,https
#--entryPoints='Name:traefik Address::${TRAEFIK_DASHBOARD_PORT} Auth.Basic.Users:${TRAEFIK_DASHBOARD_USER}:${TRAEFIK_DASHBOARD_PASSWORD}'
--entryPoints='Name:http Address::80 Redirect.EntryPoint:https'
--entryPoints='Name:https Address::443 TLS TLS.MinVersion:VersionTLS12'
--docker
--docker.endpoint="unix:///var/run/docker.sock"
--docker.domain=${TRAEFIK_DOMAIN}
--docker.watch=true
--docker.exposedbydefault=false
--acme
--acme.email=${TRAEFIK_ACME_EMAIL}
--acme.entrypoint=https
--acme.httpchallenge.entrypoint=http
--acme.storage=/data/traefik/acme.json
--acme.onhostrule=true
labels:
- traefik.docker.network=app-tier
env_file:
- .env
ports:
- 80:80
- 443:443
#- ${TRAEFIK_DASHBOARD_PORT}:${TRAEFIK_DASHBOARD_PORT}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /data/traefik/:/data/traefik
networks:
- app-tier
volumes:
databasevol:
networks:
app-tier:
driver: bridge
driver_opts:
com.docker.network.driver.mtu: 1450