-
Notifications
You must be signed in to change notification settings - Fork 6
/
docker-compose.common.yml
112 lines (99 loc) · 3.4 KB
/
docker-compose.common.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
# Base docker-compose file used by each of the specific mode-files.
version: "3.7"
services:
# Hosts static requests to admin and proxies dynamic requests to admin-php.
admin-nginx:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-admin-nginx:${ADMIN_NGINX_BUILD_TAG}
ports:
- 80
volumes:
- admin-release:/var/www
- symfony-cache:/var/www/admin/var
- admin-uploads:/var/www/admin/web/uploads
# We need search and middleware to be resolvable before starting or nginx
# will crash.
depends_on:
- middleware
- search
environment:
VIRTUAL_HOST: admin.${DOCKER_BASE_DOMAIN}
admin-php:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-admin-php:${ADMIN_PHP_BUILD_TAG}
volumes:
- admin-release:/var/www
- admin-uploads:/var/www/admin/web/uploads
- symfony-cache:/var/www/admin/var
- ./development/admin/docker/parameters.yml:/var/www/admin/app/config/parameters.yml
- ./development/scripts:/opt/development/scripts
- ./development/state-import:/opt/development/state-import
admin-cron:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-admin-php:${ADMIN_PHP_BUILD_TAG}
volumes:
- admin-release:/var/www
- admin-uploads:/var/www/admin/web/uploads
- symfony-cache:/var/www/admin/var
- ./development/admin/docker/parameters.yml:/var/www/admin/app/config/parameters.yml
- ./development/scripts:/opt/development/scripts
command: jobber-entrypoint.sh
elasticsearch:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-elasticsearch:${ELASTICSEARCH_SOURCE_TAG}-${ELASTICSEARCH_BUILD_TAG}
volumes:
- es-data:/var/lib/elasticsearch
search:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-search:${SEARCH_SOURCE_TAG}-${SEARCH_BUILD_TAG}
ports:
- 3010
environment:
VIRTUAL_HOST: search.${DOCKER_BASE_DOMAIN}
depends_on:
- elasticsearch
redis:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-redis:${REDIS_SOURCE_TAG}-${REDIS_BUILD_TAG}
middleware:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-middleware:${MIDDLEWARE_SOURCE_TAG}-${MIDDLEWARE_BUILD_TAG}
ports:
- 3020
environment:
VIRTUAL_HOST: middleware.${DOCKER_BASE_DOMAIN}
depends_on:
- redis
screen:
image: ${MAIN_IMAGE_REPOSITORY}/os2display-screen:${SCREEN_SOURCE_TAG}-${SCREEN_BUILD_TAG}
ports:
- 80
volumes:
- './development/admin/docker/screen-config.js:/var/www/screen/app/config.js'
environment:
VIRTUAL_HOST: screen.${DOCKER_BASE_DOMAIN}
# We proxy these so need them to exist.
depends_on:
- middleware
- search
admin-db:
image: mariadb:10.3
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: os2display
MYSQL_USER: os2display
MYSQL_PASSWORD: os2display
volumes:
- db-data:/var/lib/mysql
- ${DB_DUMP}
mailhog:
image: mailhog/mailhog
environment:
VIRTUAL_HOST: mail.${DOCKER_BASE_DOMAIN}
VIRTUAL_PORT: 8025
# Add in the admin_release service even though we might not need its contents
# if we're running in dev-mode.
# The reason we still add it in common is in order for docker-compose down
# to know that the container needs to be removed when we switch from release-
# to dev-mode.
admin_release:
image: ${PROJECT_IMAGE_REPOSITORY}/os2display-admin-release:${ADMIN_RELEASE_TAG}
volumes:
es-data:
db-data:
admin-uploads:
symfony-cache:
admin-release: