-
Notifications
You must be signed in to change notification settings - Fork 10
/
docker-compose.yml
164 lines (151 loc) · 4.12 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
services:
database:
image: mysql:8.0 # 8.0.35 in prod
networks:
- weather.gov
environment:
MYSQL_DATABASE: weathergov
MYSQL_USER: drupal
MYSQL_PASSWORD: drupal
MYSQL_ROOT_PASSWORD: drupal
ports:
- 3306:3306
api-proxy:
build:
context: ./tests/api
dockerfile: Dockerfile
environment:
WX_NOW_TIMESTAMP: ${WX_NOW_TIMESTAMP:-}
networks:
- weather.gov
ports:
- 8081:8081
volumes:
- ./tests/api:/app
- /app/node_modules
api-interop-layer:
build:
context: ./api-interop-layer
dockerfile: Dockerfile
# Use the same resource limits as deployed
deploy:
resources:
limits:
memory: 256MB
environment:
PORT: 8082
DB_NAME: weathergov
DB_USERNAME: drupal
DB_PASSWORD: drupal
DB_HOST: database
DB_PORT: 3306
API_URL: http://api-proxy:8081
API_INTEROP_NAME: ${API_INTEROP_NAME:-local}
NEWRELIC_LICENSE: $NEWRELIC_LICENSE
networks:
- weather.gov
links:
- database
- api-proxy
ports:
- 8082:8082
- 9229:9229
volumes:
- ./api-interop-layer:/app
- /app/node_modules
drupal:
build:
context: ./
dockerfile: Dockerfile.dev
args:
UID: ${UID:-1000}
GID: ${GID:-100}
image: 18f-zscaler-drupal:10-apache
ports:
- 8080:80
networks:
- weather.gov
links:
- database
- api-proxy
- api-interop-layer
environment:
API_URL: http://api-proxy:8081
API_INTEROP_URL: http://api-interop-layer:8082
DRUPAL_DB_NAME: weathergov
DRUPAL_DB_USERNAME: drupal
DRUPAL_DB_PASSWORD: drupal
DRUPAL_DB_HOST: database
DRUPAL_DB_PORT: 3306
WX_NOW_TIMESTAMP: ${WX_NOW_TIMESTAMP:-}
volumes:
# Map in our composer files. That way if we make changes inside the
# container, they'll be persisted out here in the real world.
- ./composer.json:/opt/drupal/composer.json
- ./composer.lock:/opt/drupal/composer.lock
# Map in our sites directory. This includes our settings.php.
- ./web/sites:/opt/drupal/web/sites
# Map in our modules, themes, and site settings. But be sure not to map in
# any contrib directories, since those are 3rd-party installs from
# composer. If we map them in, we'll overwrite what's in the container,
# and we don't really want that.
- ./web/modules:/opt/drupal/web/modules
- ./web/themes:/opt/drupal/web/themes
- /opt/drupal/web/modules/contrib
- /opt/drupal/web/themes/contrib
# Map in saved configuration. This is used to import configuration and it
# is also where configuration gets exported to. The target/container
# directory needs to match the value of $settings['config_sync_directory']
# in settings.php
- ./web/config:/opt/drupal/web/config
- ./web/scs-export:/opt/drupal/web/scs-export
# And finally map in our phpcs file, so we can run php-codesniffer inside
# the container.
- ./phpcs.xml:/opt/drupal/phpcs.xml
- ./phpunit.xml:/opt/drupal/phpunit.xml
# Map in our test coverage directory so we can have those pretty outputs.
- ./.coverage:/coverage
plantuml:
build:
context: ./
dockerfile: Dockerfile.plantuml
image: 18f-zscaler-plantum:jetty
ports:
- 8180:8080
profiles: ["utility"]
utility-node:
build:
context: .
dockerfile: Dockerfile.utility-node
networks:
- weather.gov
links:
- database
volumes:
- ./:/app
- /app/node_modules
profiles: ["utility"]
uswds:
build:
context: ./
dockerfile: Dockerfile.uswds
volumes:
- ./web/themes/new_weather_theme/:/app
- /app/node_modules
profiles: ["utility"]
spatial:
build:
context: ./spatial-data
dockerfile: Dockerfile.spatial
image: 18f-spatial-node:20
networks:
- weather.gov
links:
- database
environment:
DB_HOST: database
volumes:
- ./spatial-data/:/app
- /app/node_modules
networks:
weather.gov: