This repository has been archived by the owner on Nov 3, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
966 lines (915 loc) · 27.3 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
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
version: '3.4'
x-govuk-app-env: &govuk-app
DISABLE_DATABASE_ENVIRONMENT_CHECK: 1
GDS_SSO_STRATEGY: mock
GDS_API_DISABLE_CACHE: "true"
GOVUK_APP_DOMAIN: dev.gov.uk
GOVUK_APP_DOMAIN_EXTERNAL: dev.gov.uk
GOVUK_ASSET_ROOT: http://assets-origin.dev.gov.uk
GOVUK_WEBSITE_ROOT: http://www.dev.gov.uk
GOVUK_PROMETHEUS_EXPORTER: "false"
JWT_AUTH_SECRET: fakejwtsecret
LOG_PATH: log/live.log
PLEK_SERVICE_SEARCH_API_URI: http://search-api.dev.gov.uk
PLEK_UNPREFIXABLE_HOSTS: search-api
RAILS_ENV: production
RAILS_SERVE_STATIC_FILES: "true"
SECRET_KEY_BASE: 875c6bf4c48da9bb41f4cfd25d09bf5e2a62d88b39efc4bd9c498e6c8f61e4df740af87386f97269525e01b5f74402512eb6a4723882579f10aa95f6e2971fc2
SENTRY_DSN: http://user:password@error-handler.dev.gov.uk/123
UNICORN_WORKER_PROCESSES: 1
x-default-healthcheck: &default-healthcheck
interval: 10s
timeout: 20s
x-draft-govuk-app-env: &draft-govuk-app
<< : *govuk-app
LOG_PATH: log/draft.log
PLEK_HOSTNAME_PREFIX: draft-
x-search-api-env: &search-api-env
ELASTICSEARCH_URI: http://elasticsearch6:9200
PORT: 3233
RABBITMQ_HOSTS: rabbitmq
RABBITMQ_VHOST: /
RABBITMQ_USER: guest
RABBITMQ_PASSWORD: guest
RACK_ENV: production
REDIS_URL: redis://redis
services:
nginx-proxy:
image: jwilder/nginx-proxy:alpine
ports:
- "80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock
- ./docker/nginx.tmpl:/app/nginx.tmpl
- ./nginx-certs:/etc/nginx/certs
postgres:
image: postgres:13-alpine
command: -B 32MB -S 2MB
environment:
POSTGRES_PASSWORD: postgres
healthcheck:
<< : *default-healthcheck
test: "psql --username 'postgres' -c 'SELECT 1'"
memcached:
image: memcached:1-alpine
mysql:
image: mysql:8
command: >
--default-authentication-plugin=mysql_native_password
--performance-schema=off --innodb_buffer_pool_size=32M
--innodb-log-buffer-size=8M --key_buffer_size=4M
environment:
MYSQL_ROOT_PASSWORD: root
healthcheck:
<< : *default-healthcheck
test: "mysql --user=root --password=root -e 'SELECT 1'"
mongo-3.6:
image: mongo:3.6
hostname: mongo-3.6
healthcheck:
<< : *default-healthcheck
test: "echo 'db.stats().ok' | mongo localhost:27017/test --quiet"
mongo-2.6:
image: mongo:2.6
hostname: mongo-2.6
command: ["--replSet", "mongo-2.6-replica-set"]
healthcheck:
<< : *default-healthcheck
test: test $$(echo "rs.initiate().ok || rs.status().ok" | mongo localhost:27017/test --quiet) -eq 1
redis:
image: redis:6-alpine
command: ["--maxmemory", "32MB"]
healthcheck:
<< : *default-healthcheck
test: "redis-cli ping"
rabbitmq:
# govuk-puppet uses 3.6; 3.8 is the closest we can get here.
image: rabbitmq:3.8-alpine
environment:
# TODO: this env var is going away in Rabbit 3.9.
- RABBITMQ_VM_MEMORY_HIGH_WATERMARK=256MB
healthcheck:
<< : *default-healthcheck
test: "rabbitmqctl node_health_check"
elasticsearch6:
image: elasticsearch:6.7.0
environment:
- http.host=0.0.0.0
- transport.host=127.0.0.1
- discovery.type=single-node
- ES_JAVA_OPTS=-Xms512m -Xmx512m
- xpack.security.enabled=false
healthcheck:
<< : *default-healthcheck
test: "curl --silent --fail localhost:9200/_cluster/health || exit 1"
volumes:
- ./docker/elasticsearch6.yml:/usr/share/elasticsearch/config/elasticsearch.yml
search-api: &search-api
image: govuk/search-api:${SEARCH_API_COMMITISH:-deployed-to-production}
build: apps/search-api
depends_on:
- redis
- elasticsearch6
- publishing-api
- search-api-worker
- search-api-listener-publishing-queue
- search-api-listener-insert-data
- search-api-listener-bulk-insert-data
- diet-error-handler
environment:
<< : *govuk-app
<< : *search-api-env
SENTRY_CURRENT_ENV: search-api
VIRTUAL_HOST: search-api.dev.gov.uk
links:
- nginx-proxy:error-handler.dev.gov.uk
- nginx-proxy:publishing-api.dev.gov.uk
ports:
- "3233"
volumes:
- ./apps/search-api/log:/app/log
search-api-worker:
<< : *search-api
depends_on:
- elasticsearch6
- rabbitmq
- publishing-api
- diet-error-handler
- redis
command: bundle exec sidekiq -C ./config/sidekiq.yml
environment:
<< : *govuk-app
<< : *search-api-env
SENTRY_CURRENT_ENV: search-api-worker
links:
- nginx-proxy:publishing-api.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports: []
search-api-listener-publishing-queue:
<< : *search-api
command: bundle exec rake message_queue:listen_to_publishing_queue
depends_on:
- diet-error-handler
- rabbitmq
- redis
environment:
<< : *govuk-app
<< : *search-api-env
SENTRY_CURRENT_ENV: search-api-listener-publishing-queue
ports: []
search-api-listener-insert-data:
<< : *search-api
command: bundle exec rake message_queue:insert_data_into_govuk
depends_on:
- diet-error-handler
- rabbitmq
- redis
environment:
<< : *govuk-app
<< : *search-api-env
SENTRY_CURRENT_ENV: search-api-listener-insert-data
ports: []
search-api-listener-bulk-insert-data:
<< : *search-api
command: bundle exec rake message_queue:bulk_insert_data_into_govuk
depends_on:
- diet-error-handler
- rabbitmq
- redis
environment:
<< : *govuk-app
<< : *search-api-env
SENTRY_CURRENT_ENV: search-api-listener-bulk-insert-data
ports: []
diet-error-handler:
build: diet-error-handler
environment:
VIRTUAL_HOST: error-handler.dev.gov.uk
ports:
- "3129"
volumes:
- ./tmp:/app/tmp
router: &router
image: govuk/router:${ROUTER_COMMITISH:-deployed-to-production}
build: apps/router
depends_on:
- mongo-2.6
environment:
VIRTUAL_HOST: www.dev.gov.uk
VIRTUAL_PORT: 3054
ROUTER_BACKEND_HEADER_TIMEOUT: 60s
ROUTER_MONGO_URL: mongo-2.6
links:
- nginx-proxy:government-frontend.dev.gov.uk
- nginx-proxy:collections.dev.gov.uk
- nginx-proxy:frontend.dev.gov.uk
- nginx-proxy:whitehall-frontend.dev.gov.uk
- nginx-proxy:finder-frontend.dev.gov.uk
ports:
- "3054"
- "3055"
draft-router:
<< : *router
environment:
GOVUK_APP_NAME: draft-router
PLEK_HOSTNAME_PREFIX: draft-
ROUTER_BACKEND_HEADER_TIMEOUT: 60s
ROUTER_PUBADDR: ":3154"
ROUTER_APIADDR: ":3155"
ROUTER_MONGO_DB: draft-router
ROUTER_MONGO_URL: mongo-2.6
VIRTUAL_HOST: draft-origin.dev.gov.uk
VIRTUAL_PORT: 3154
links:
- nginx-proxy:draft-government-frontend.dev.gov.uk
- nginx-proxy:draft-collections.dev.gov.uk
- nginx-proxy:draft-frontend.dev.gov.uk
- nginx-proxy:draft-whitehall-frontend.dev.gov.uk
ports:
- "3154"
- "3155"
router-api: &router-api
image: govuk/router-api:${ROUTER_API_COMMITISH:-deployed-to-production}
build: apps/router-api
depends_on:
- mongo-2.6
- router
- diet-error-handler
environment:
<< : *govuk-app
SENTRY_CURRENT_ENV: router-api
VIRTUAL_HOST: router-api.dev.gov.uk
MONGODB_URI: mongodb://mongo-2.6/router
TEST_MONGODB_URI: mongodb://mongo/router-test
PORT: 3056
links:
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3056"
volumes:
- ./apps/router-api/log:/app/log
draft-router-api:
<< : *router-api
depends_on:
- mongo-2.6
- draft-router
- diet-error-handler
environment:
<< : *draft-govuk-app
GOVUK_APP_NAME: draft-router-api
MONGODB_URI: mongodb://mongo-2.6/draft-router
TEST_MONGODB_URI: mongodb://mongo/router-test
PORT: 3156
ROUTER_NODES: "draft-router:3155"
SENTRY_CURRENT_ENV: draft-router-api
VIRTUAL_HOST: draft-router-api.dev.gov.uk
links:
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3156"
content-store: &content-store
image: govuk/content-store:${CONTENT_STORE_COMMITISH:-deployed-to-production}
build: apps/content-store
depends_on:
- mongo-2.6
- router-api
- diet-error-handler
environment:
<< : *govuk-app
MONGO_WRITE_CONCERN: 1
MONGODB_URI: mongodb://mongo-2.6/content-store
PORT: 3068
SENTRY_CURRENT_ENV: content-store
VIRTUAL_HOST: content-store.dev.gov.uk
links:
- nginx-proxy:router-api.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3068"
volumes:
- ./apps/content-store/log:/app/log
- ./apps/govuk-content-schemas:/govuk-content-schemas
draft-content-store:
<< : *content-store
depends_on:
- mongo-2.6
- draft-router-api
- diet-error-handler
environment:
<< : *draft-govuk-app
GOVUK_APP_NAME: draft-content-store
MONGO_WRITE_CONCERN: 1
MONGODB_URI: mongodb://mongo-2.6/draft-content-store
PORT: 3100
SENTRY_CURRENT_ENV: draft-content-store
VIRTUAL_HOST: draft-content-store.dev.gov.uk
links:
- nginx-proxy:draft-router-api.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3100"
publishing-api: &publishing-api
image: govuk/publishing-api:${PUBLISHING_API_COMMITISH:-deployed-to-production}
build: apps/publishing-api
depends_on:
- postgres
- redis
- memcached
- rabbitmq
- publishing-api-worker
- diet-error-handler
environment:
<< : *govuk-app
DATABASE_URL: &publishing-api-db postgresql://postgres:postgres@postgres/publishing-api
MEMCACHE_SERVERS: memcached
PORT: 3093
RABBITMQ_URL: &publishing-api-rabbitmq amqp://guest:guest@rabbitmq:5672
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: publishing-api
VIRTUAL_HOST: publishing-api.dev.gov.uk
healthcheck:
<< : *default-healthcheck
test: "curl --silent --fail localhost:3093/healthcheck/live || exit 1"
links:
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3093"
volumes:
- ./apps/govuk-content-schemas:/govuk-content-schemas
- ./apps/publishing-api/log:/app/log
publishing-api-worker:
<< : *publishing-api
command: bundle exec sidekiq -C ./config/sidekiq.yml
depends_on:
- postgres
- redis
- content-store
- draft-content-store
- diet-error-handler
- memcached
- rabbitmq
environment:
<< : *govuk-app
DATABASE_URL: *publishing-api-db
RABBITMQ_URL: *publishing-api-rabbitmq
REDIS_URL: redis://redis
MEMCACHE_SERVERS: memcached
SENTRY_CURRENT_ENV: publishing-api-worker
healthcheck:
disable: true
links:
- nginx-proxy:content-store.dev.gov.uk
- nginx-proxy:draft-content-store.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports: []
specialist-publisher:
image: govuk/specialist-publisher:${SPECIALIST_PUBLISHER_COMMITISH:-deployed-to-production}
build:
context: apps/specialist-publisher
depends_on:
- mongo-3.6
- redis
- publishing-api
- asset-manager
- diet-error-handler
environment:
<< : *govuk-app
# This is not a valid key but it needs to be in the correct format for the ruby client
GOVUK_NOTIFY_API_KEY: test-b56ea330-006a-459b-8af3-8015bb51a0e7-77b95465-3c02-4b09-9371-44e33cbdf9c6
MONGO_WRITE_CONCERN: 1
MONGODB_URI: mongodb://mongo-3.6/specialist-publisher
PORT: 3064
REDIS_HOST: redis
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: specialist-publisher
VIRTUAL_HOST: specialist-publisher.dev.gov.uk
healthcheck:
<< : *default-healthcheck
test: "curl --silent --fail localhost:3064 || exit 1"
links:
- nginx-proxy:publishing-api.dev.gov.uk
- nginx-proxy:asset-manager.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3064"
volumes:
- ./apps/specialist-publisher/log:/app/log
collections: &collections
image: govuk/collections:${COLLECTIONS_COMMITISH:-deployed-to-production}
build:
context: apps/collections
depends_on:
- content-store
- static
- search-api
- diet-error-handler
environment:
<< : *govuk-app
SENTRY_CURRENT_ENV: collections
VIRTUAL_HOST: collections.dev.gov.uk
PORT: 3070
links:
- nginx-proxy:search-api.dev.gov.uk
- nginx-proxy:content-store.dev.gov.uk
- nginx-proxy:static.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3070"
volumes:
- ./apps/collections/log:/app/log
draft-collections:
<< : *collections
depends_on:
- draft-content-store
- draft-static
- search-api
- diet-error-handler
environment:
<< : *draft-govuk-app
SENTRY_CURRENT_ENV: draft-collections
VIRTUAL_HOST: draft-collections.dev.gov.uk
PORT: 3170
links:
- nginx-proxy:search-api.dev.gov.uk
- nginx-proxy:draft-content-store.dev.gov.uk
- nginx-proxy:draft-static.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3170"
contacts-admin:
image: govuk/contacts:${CONTACTS_ADMIN_COMMITISH:-deployed-to-production}
build:
context: apps/contacts-admin
depends_on:
- collections
- diet-error-handler
- mysql
- publishing-api
- router
- search-api
- whitehall-admin
environment:
<< : *govuk-app
SENTRY_CURRENT_ENV: contacts-admin
VIRTUAL_HOST: contacts-admin.dev.gov.uk
PORT: 3051
DATABASE_URL: mysql2://root:root@mysql/contacts-admin
healthcheck:
<< : *default-healthcheck
links:
- nginx-proxy:search-api.dev.gov.uk
- nginx-proxy:publishing-api.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
- nginx-proxy:whitehall-admin.dev.gov.uk
- nginx-proxy:www.dev.gov.uk
ports:
- "3051"
volumes:
- ./apps/contacts-admin/log:/app/log
finder-frontend:
image: govuk/finder-frontend:${FINDER_FRONTEND_COMMITISH:-deployed-to-production}
build:
context: apps/finder-frontend
depends_on:
- content-store
- static
- search-api
- diet-error-handler
- whitehall-frontend
- router
- memcached
environment:
<< : *govuk-app
ASSET_HOST: finder-frontend.dev.gov.uk
MEMCACHE_SERVERS: memcached
SENTRY_CURRENT_ENV: finder-frontend
VIRTUAL_HOST: finder-frontend.dev.gov.uk
PORT: 3062
healthcheck:
test: "curl --silent --fail localhost:3062/healthcheck/ready || exit 1"
<< : *default-healthcheck
links:
- nginx-proxy:search-api.dev.gov.uk
- nginx-proxy:content-store.dev.gov.uk
- nginx-proxy:static.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
- nginx-proxy:whitehall-frontend.dev.gov.uk
- nginx-proxy:www.dev.gov.uk
ports:
- "3062"
volumes:
- ./apps/finder-frontend/log:/app/log
publisher: &publisher
image: govuk/publisher:${PUBLISHER_COMMITISH:-deployed-to-production}
build:
context: apps/publisher
depends_on:
- publishing-api
- publisher-worker
- diet-error-handler
- redis
- mongo-3.6
- router
environment:
<< : *govuk-app
DISABLE_SECURE_COOKIES: "true"
DISABLE_EMAIL: "true"
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: publisher
VIRTUAL_HOST: publisher.dev.gov.uk
GOVUK_CONTENT_SCHEMAS_PATH: /govuk-content-schemas/
MONGODB_URI: mongodb://mongo-3.6/publisher
PORT: 3000
ASSETS_PREFIX: /assets/publisher
healthcheck:
<< : *default-healthcheck
volumes:
- apps/govuk-content-schemas/:/govuk-content-schemas/
links:
- nginx-proxy:publishing-api.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
- nginx-proxy:www.dev.gov.uk
ports:
- "3000"
volumes:
- ./apps/publisher/log:/app/log
publisher-worker:
<< : *publisher
command: bundle exec sidekiq -C config/sidekiq.yml
depends_on:
- mongo-3.6
- redis
- publishing-api
- diet-error-handler
environment:
<< : *govuk-app
MONGODB_URI: mongodb://mongo-3.6/publisher
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: publisher-worker
healthcheck:
disable: true
ports: []
frontend: &frontend
image: govuk/frontend:${FRONTEND_COMMITISH:-deployed-to-production}
build:
context: apps/frontend
depends_on:
- content-store
- static
- diet-error-handler
- publishing-api
environment:
<< : *govuk-app
ASSET_HOST: frontend.dev.gov.uk
PORT: 3005
SENTRY_CURRENT_ENV: frontend
VIRTUAL_HOST: frontend.dev.gov.uk
healthcheck:
<< : *default-healthcheck
links:
- nginx-proxy:content-store.dev.gov.uk
- nginx-proxy:static.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
- nginx-proxy:publishing-api.dev.gov.uk
ports:
- "3005"
volumes:
- ./apps/frontend/log:/app/log
draft-frontend:
<< : *frontend
depends_on:
- draft-content-store
- draft-static
- diet-error-handler
environment:
<< : *draft-govuk-app
ASSET_HOST: draft-frontend.dev.gov.uk
PORT: 3105
SENTRY_CURRENT_ENV: draft-frontend
VIRTUAL_HOST: draft-frontend.dev.gov.uk
links:
- nginx-proxy:draft-content-store.dev.gov.uk
- nginx-proxy:draft-static.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3105"
whitehall-admin: &whitehall
image: govuk/whitehall:${WHITEHALL_COMMITISH:-deployed-to-production}
build:
context: apps/whitehall
depends_on:
- asset-manager
- content-store
- diet-error-handler
- mysql
- publishing-api
- redis
- search-api
- static
- whitehall-worker
environment:
<< : *govuk-app
DISABLE_SECURE_COOKIES: "true"
VIRTUAL_HOST: whitehall-admin.dev.gov.uk
MEMCACHE_SERVERS: memcached
SENTRY_CURRENT_ENV: whitehall-admin
LOG_PATH: log/admin.log
REDIS_URL: redis://redis
PORT: 3020
DATABASE_URL: mysql2://root:root@mysql/whitehall_development
GOVUK_UPLOADS_ROOT: /uploads
healthcheck:
<< : *default-healthcheck
links:
- nginx-proxy:asset-manager.dev.gov.uk
- nginx-proxy:content-store.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
- nginx-proxy:publishing-api.dev.gov.uk
- nginx-proxy:search-api.dev.gov.uk
- nginx-proxy:static.dev.gov.uk
ports:
- "3020"
volumes:
- ./apps/whitehall/log:/app/log
- ./tmp:/uploads # Must be writable by unprivileged user.
whitehall-frontend:
<< : *whitehall
environment:
<< : *govuk-app
ASSET_HOST: whitehall-frontend.dev.gov.uk
MEMCACHE_SERVERS: memcached
VIRTUAL_HOST: whitehall-frontend.dev.gov.uk
SENTRY_CURRENT_ENV: whitehall-frontend
LOG_PATH: log/frontend.log
REDIS_URL: redis://redis
PORT: 3020
DATABASE_URL: mysql2://root:root@mysql/whitehall_development
draft-whitehall-frontend:
<< : *whitehall
environment:
<< : *govuk-app
ASSET_HOST: draft-whitehall-frontend.dev.gov.uk
MEMCACHE_SERVERS: memcached
VIRTUAL_HOST: draft-whitehall-frontend.dev.gov.uk
SENTRY_CURRENT_ENV: draft-whitehall-frontend
LOG_PATH: log/draft-frontend.log
REDIS_URL: redis://redis
PORT: 3020
DATABASE_URL: mysql2://root:root@mysql/whitehall_development
whitehall-worker:
<< : *whitehall
command: bundle exec sidekiq -C config/sidekiq.yml
depends_on:
- diet-error-handler
- redis
environment:
<< : *govuk-app
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: whitehall-worker
PORT: 3020
DATABASE_URL: mysql2://root:root@mysql/whitehall_development
healthcheck:
disable: true
ports: []
content-tagger: &content-tagger
image: govuk/content-tagger:${CONTENT_TAGGER_COMMITISH:-deployed-to-production}
build: apps/content-tagger
depends_on:
- content-tagger-worker
- diet-error-handler
- email-alert-api
- publishing-api
- postgres
- redis
- search-api
- content-store
environment:
<< : *govuk-app
DATABASE_URL: postgresql://postgres:postgres@postgres/content-tagger
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: content-tagger
VIRTUAL_HOST: content-tagger.dev.gov.uk
PORT: 3116
healthcheck:
<< : *default-healthcheck
test: "curl --silent --fail localhost:3116 || exit 1"
links:
- nginx-proxy:email-alert-api.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
- nginx-proxy:publishing-api.dev.gov.uk
ports:
- "3116"
volumes:
- ./apps/content-tagger/log:/app/log
content-tagger-worker:
<< : *content-tagger
command: bundle exec sidekiq -C ./config/sidekiq.yml
depends_on:
- diet-error-handler
- redis
environment:
<< : *govuk-app
DATABASE_URL: postgresql://postgres:postgres@postgres/content-tagger
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: content-tagger-worker
healthcheck:
disable: true
ports: []
asset-manager: &asset-manager
image: govuk/asset-manager:${ASSET_MANAGER_COMMITISH:-deployed-to-production}
build: apps/asset-manager
depends_on:
- asset-manager-worker
- diet-error-handler
- mongo-3.6
- redis
links:
- nginx-proxy:error-handler.dev.gov.uk
environment:
<< : *govuk-app
ASSET_MANAGER_CLAMSCAN_PATH: /bin/true
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: asset-manager
VIRTUAL_HOST: asset-manager.dev.gov.uk
FAKE_S3_HOST: http://127.0.0.1
ALLOW_FAKE_S3_IN_PRODUCTION_FOR_PUBLISHING_E2E_TESTS: "true"
MONGODB_URI: mongodb://mongo-3.6/asset-manager
PORT: 3037
healthcheck:
<< : *default-healthcheck
ports:
- "3037"
volumes:
- ./apps/asset-manager/log:/app/log
- ./tmp/uploads:/app/uploads
- ./tmp/fake-s3:/app/fake-s3
asset-manager-worker:
<< : *asset-manager
command: bundle exec sidekiq -C config/sidekiq.yml
depends_on:
- mongo-3.6
- diet-error-handler
- redis
environment:
<< : *govuk-app
ASSET_MANAGER_CLAMSCAN_PATH: /bin/true
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: asset-manager-worker
FAKE_S3_HOST: http://127.0.0.1
ALLOW_FAKE_S3_IN_PRODUCTION_FOR_PUBLISHING_E2E_TESTS: "true"
MONGODB_URI: mongodb://mongo-3.6/asset-manager
PORT: 3037
healthcheck:
disable: true
ports: []
email-alert-api: &email-alert-api
image: govuk/email-alert-api:${EMAIL_ALERT_API_COMMITISH:-deployed-to-production}
build: apps/email-alert-api
depends_on:
- diet-error-handler
- email-alert-api-worker
- postgres
- redis
links:
- nginx-proxy:error-handler.dev.gov.uk
environment:
<< : *govuk-app
DATABASE_URL: postgresql://postgres:postgres@postgres/email-alert-api
EMAIL_ALERT_AUTH_TOKEN: 9d3e07ca727cd08cc503191f233919877160bfc57eaaa33541761c2d1ffd951ae205263be5832f26ba2670b142d7c593ec0f6bdd11a84cf325a32dbdd889ff44
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: email-alert-api
VIRTUAL_HOST: email-alert-api.dev.gov.uk
healthcheck:
<< : *default-healthcheck
ports:
- "3088"
volumes:
- ./apps/email-alert-api/log:/app/log
email-alert-api-worker:
<< : *email-alert-api
command: bundle exec sidekiq -C ./config/sidekiq.yml
depends_on:
- diet-error-handler
- redis
environment:
<< : *govuk-app
DATABASE_URL: postgresql://postgres:postgres@postgres/email-alert-api
EMAIL_ALERT_AUTH_TOKEN: 9d3e07ca727cd08cc503191f233919877160bfc57eaaa33541761c2d1ffd951ae205263be5832f26ba2670b142d7c593ec0f6bdd11a84cf325a32dbdd889ff44
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: email-alert-api-worker
healthcheck:
disable: true
ports: []
static: &static
image: govuk/static:${STATIC_COMMITISH:-deployed-to-production}
build: apps/static
depends_on:
- diet-error-handler
- redis
environment:
<< : *govuk-app
ASSET_HOST: static.dev.gov.uk
PORT: 3013
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: static
VIRTUAL_HOST: static.dev.gov.uk
links:
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3013"
volumes:
- ./apps/static/log:/app/log
draft-static:
<< : *static
environment:
<< : *draft-govuk-app
ASSET_HOST: draft-static.dev.gov.uk
GOVUK_APP_NAME: draft-static
PORT: 3113
REDIS_URL: redis://redis
SENTRY_CURRENT_ENV: draft-static
VIRTUAL_HOST: draft-static.dev.gov.uk
ports:
- "3113"
government-frontend: &government-frontend
image: govuk/government-frontend:${GOVERNMENT_FRONTEND_COMMITISH:-deployed-to-production}
build: apps/government-frontend
depends_on:
- content-store
- static
- diet-error-handler
- memcached
environment:
<< : *govuk-app
ASSET_HOST: government-frontend.dev.gov.uk
MEMCACHE_SERVERS: memcached
SENTRY_CURRENT_ENV: government-frontend
VIRTUAL_HOST: government-frontend.dev.gov.uk
VIRTUAL_PORT: 3090
healthcheck:
<< : *default-healthcheck
links:
- nginx-proxy:content-store.dev.gov.uk
- nginx-proxy:static.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3090"
volumes:
- ./apps/government-frontend/log:/app/log
draft-government-frontend:
<< : *government-frontend
depends_on:
- draft-content-store
- draft-static
- diet-error-handler
- memcached
environment:
<< : *draft-govuk-app
ASSET_HOST: draft-government-frontend.dev.gov.uk
MEMCACHE_SERVERS: memcached
GOVUK_APP_NAME: draft-government-frontend
PORT: 3190
SENTRY_CURRENT_ENV: draft-government-frontend
VIRTUAL_HOST: draft-government-frontend.dev.gov.uk
links:
- nginx-proxy:draft-content-store.dev.gov.uk
- nginx-proxy:draft-static.dev.gov.uk
- nginx-proxy:error-handler.dev.gov.uk
ports:
- "3190"
publishing-e2e-tests:
shm_size: 2G
build: .
depends_on:
- draft-router
- draft-static
- router
- static
- contacts-admin
- content-tagger
- publisher
- specialist-publisher
- whitehall-admin
links:
# Draft frontend
- nginx-proxy:draft-origin.dev.gov.uk
- nginx-proxy:draft-frontend.dev.gov.uk
- nginx-proxy:draft-government-frontend.dev.gov.uk
- nginx-proxy:draft-whitehall-frontend.dev.gov.uk
- nginx-proxy:draft-static.dev.gov.uk
# Live frontend
- nginx-proxy:assets-origin.dev.gov.uk
- nginx-proxy:finder-frontend.dev.gov.uk
- nginx-proxy:frontend.dev.gov.uk
- nginx-proxy:government-frontend.dev.gov.uk
- nginx-proxy:static.dev.gov.uk
- nginx-proxy:whitehall-frontend.dev.gov.uk
- nginx-proxy:www.dev.gov.uk
# Publishing applications
- nginx-proxy:contacts-admin.dev.gov.uk
- nginx-proxy:content-tagger.dev.gov.uk
- nginx-proxy:publisher.dev.gov.uk
- nginx-proxy:specialist-publisher.dev.gov.uk
- nginx-proxy:whitehall-admin.dev.gov.uk
volumes:
- ./tmp:/app/tmp