This repository has been archived by the owner on Apr 21, 2024. It is now read-only.
forked from UKForeignOffice/lists
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
138 lines (133 loc) · 5.29 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
version: "3.9"
services:
postgres:
platform: linux/amd64
build:
context: ./docker/db
dockerfile: Dockerfile
# if you are on Mac M1 please use the image below
# see https://github.com/docker/for-mac/issues/5122
# image: "gangstead/postgis:13-3.1-arm"
healthcheck:
test: ["CMD", "pg_isready", "-U", "master", "-d", "lists"]
interval: 30s
timeout: 60s
retries: 5
start_period: 30s
ports:
- "5432:5432"
redis:
image: "redis:alpine"
command: redis-server --requirepass redispassword
ports:
- 6379:6379
lists:
build:
context: .
dockerfile: Dockerfile
target: main
args:
- BUILD_MODE=ci
ports:
- "3000:3000"
command: npm run start:ci
environment:
DATABASE_URL: "postgresql://master:postgrespass@postgres:5432/lists"
REDIS_HOST: "redis"
REDIS_PORT: 6379
REDIS_PASSWORD: redispassword
REDIS_CLUSTER_MODE: "false"
REDIS_TLS: "false"
FORM_RUNNER_URL: "apply:3001"
DEBUG: "true"
LOG_LEVEL: "info"
CI_SMOKE_TEST: "true"
NODE_ENV: "test"
LOCATION_SERVICE_INDEX_NAME: fcdo-professional-service-finder
GOVUK_NOTIFY_API_KEY: "${GOVUK_NOTIFY_API_KEY}"
GOVUK_NOTIFY_PROFESSIONAL_APPLICATION_EMAIL_CONFIRMATION_TEMPLATE_ID: "${GOVUK_NOTIFY_PROFESSIONAL_APPLICATION_EMAIL_CONFIRMATION_TEMPLATE_ID}"
GOVUK_NOTIFY_POST_NEW_PROFESSIONAL_APPLICATION_RECEIVED_TEMPLATE_ID: "${GOVUK_NOTIFY_POST_NEW_PROFESSIONAL_APPLICATION_RECEIVED_TEMPLATE_ID}"
GOVUK_NOTIFY_DATA_PUBLISHED_TEMPLATE_ID: "${GOVUK_NOTIFY_DATA_PUBLISHED_TEMPLATE_ID}"
GOVUK_NOTIFY_AUTHENTICATION_EMAIL_TEMPLATE_ID: "${GOVUK_NOTIFY_AUTHENTICATION_EMAIL_TEMPLATE_ID}"
GOVUK_NOTIFY_EDIT_DETAILS_TEMPLATE_ID: "${GOVUK_NOTIFY_EDIT_DETAILS_TEMPLATE_ID}"
GOVUK_NOTIFY_EDIT_ANNUAL_REVIEW_DATE_TEMPLATE_ID: "${GOVUK_NOTIFY_EDIT_ANNUAL_REVIEW_DATE_TEMPLATE_ID}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_ACCESS_KEY_ID}"
sandbox: "false"
# uncomment this if you have a .env file you want to use locally. Docker compose will throw an error if this does not exist.
# env_file: .env
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
apply:
condition: service_started
scheduler-batch:
build:
context: .
dockerfile: Dockerfile
target: scheduled
args:
- BUILD_MODE=ci
command: npm run scheduler:batch
environment:
DATABASE_URL: "postgresql://master:postgrespass@postgres:5432/lists"
DEBUG: "true"
LOG_LEVEL: "debug"
# uncomment this if you have a .env file you want to use locally. Docker compose will throw an error if this does not exist.
# env_file: .env
depends_on:
postgres:
condition: service_healthy
apply:
condition: service_started
scheduler-annual-review-worker:
build:
context: .
dockerfile: Dockerfile
target: scheduled
args:
- BUILD_MODE=ci
command: npm run scheduler:worker
environment:
DATABASE_URL: "postgresql://master:postgrespass@postgres:5432/lists"
FORM_RUNNER_URL: "apply:3001"
DEBUG: "true"
LOG_LEVEL: "debug"
CI_SMOKE_TEST: "${CI_SMOKE_TEST}"
LOCATION_SERVICE_INDEX_NAME: fcdo-professional-service-finder
GOVUK_NOTIFY_API_KEY: "${GOVUK_NOTIFY_API_KEY}"
GOVUK_NOTIFY_PROFESSIONAL_APPLICATION_EMAIL_CONFIRMATION_TEMPLATE_ID: "${GOVUK_NOTIFY_PROFESSIONAL_APPLICATION_EMAIL_CONFIRMATION_TEMPLATE_ID}"
GOVUK_NOTIFY_AUTHENTICATION_EMAIL_TEMPLATE_ID: "${GOVUK_NOTIFY_AUTHENTICATION_EMAIL_TEMPLATE_ID}"
GOVUK_NOTIFY_DATA_PUBLISHED_TEMPLATE_ID: "${GOVUK_NOTIFY_DATA_PUBLISHED_TEMPLATE_ID}"
GOVUK_NOTIFY_ANNUAL_REVIEW_POST_ONE_MONTH_NOTICE: "${GOVUK_NOTIFY_ANNUAL_REVIEW_POST_ONE_MONTH_NOTICE}"
GOVUK_NOTIFY_ANNUAL_REVIEW_POST_ONE_WEEK_NOTICE: "${GOVUK_NOTIFY_ANNUAL_REVIEW_POST_ONE_WEEK_NOTICE}"
GOVUK_NOTIFY_ANNUAL_REVIEW_POST_ONE_DAY_NOTICE: "${GOVUK_NOTIFY_ANNUAL_REVIEW_POST_ONE_DAY_NOTICE}"
GOVUK_NOTIFY_ANNUAL_REVIEW_POST_STARTED: "${GOVUK_NOTIFY_ANNUAL_REVIEW_POST_STARTED}"
GOVUK_NOTIFY_ANNUAL_REVIEW_PROVIDER_STARTED: "${GOVUK_NOTIFY_ANNUAL_REVIEW_PROVIDER_STARTED}"
GOVUK_NOTIFY_UNPUBLISH_POST_WEEKLY_NOTICE: "${GOVUK_NOTIFY_UNPUBLISH_POST_WEEKLY_NOTICE}"
GOVUK_NOTIFY_UNPUBLISH_POST_ONE_DAY_NOTICE: "${GOVUK_NOTIFY_UNPUBLISH_POST_ONE_DAY_NOTICE}"
GOVUK_NOTIFY_UNPUBLISHED_POST_NOTICE: "${GOVUK_NOTIFY_UNPUBLISHED_POST_NOTICE}"
GOVUK_NOTIFY_UNPUBLISH_PROVIDER_ONE_DAY_NOTICE: "${GOVUK_NOTIFY_UNPUBLISH_PROVIDER_ONE_DAY_NOTICE}"
GOVUK_NOTIFY_UNPUBLISHED_PROVIDER_NOTICE: "${GOVUK_NOTIFY_UNPUBLISHED_PROVIDER_NOTICE}"
AWS_ACCESS_KEY_ID: "${AWS_ACCESS_KEY_ID}"
AWS_SECRET_ACCESS_KEY: "${AWS_ACCESS_KEY_ID}"
sandbox: "false"
# uncomment this if you have a .env file you want to use locally. Docker compose will throw an error if this does not exist.
# env_file: .env
depends_on:
postgres:
condition: service_healthy
apply:
condition: service_started
apply:
build:
context: "docker/apply"
dockerfile: Dockerfile
environment:
NODE_ENV: test
ports:
- 3001:3001
depends_on:
- redis