Skip to content

Commit f475b0d

Browse files
committed
Default runner to talk to forms-admin rather than forms-api
We have switched our deployed versions of forms-runner to make requests to the forms-admin API endpoints through the internal load balancer rather than to forms-api by setting this environment variable for the ECS tasks. Default the local configuration to make requests to forms-admin rather than forms-api to match the deployed configuration. Because we need to use the hostname for the internal load balancer in the deployed environments, we need to keep a separate setting for this URL to the `forms_admin.base_url` setting which is used to construct links to the admin interface. We may want to consider renaming this setting in future to make it not refer to forms-api.
1 parent c49ca2b commit f475b0d

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ gem "tzinfo-data"
3838
# Reduces boot times through caching; required in config/boot.rb
3939
gem "bootsnap", require: false
4040

41-
# For forms-api
41+
# For requests to the forms-admin API
4242
gem "activeresource"
4343

4444
# Use postgresql as the database for Active Record

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ or run the rails server:
4747
npm run dev
4848
```
4949

50-
You will also need to run the [forms-api service](https://github.com/alphagov/forms-api), as this app needs the API to create and access forms.
50+
You will also need to run the [forms-admin service](https://github.com/alphagov/forms-admin), as this app needs the API to create and access forms.
5151

5252
#### Getting AWS credentials
5353

config/settings.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ forms_admin:
88
forms_api:
99
# Authentication key to authenticate forms-runner to forms-api
1010
auth_key: development_key
11-
# URL to form-api endpoints
12-
base_url: http://localhost:9292
11+
# URL to form-admin API endpoints
12+
base_url: http://localhost:3000
1313

1414
# Settings for GOV.UK Notify api & email templates
1515
govuk_notify:

spec/config/settings_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
forms_api = settings[:forms_api]
3131

3232
include_examples expected_value_test, :auth_key, forms_api, "development_key"
33-
include_examples expected_value_test, :base_url, forms_api, "http://localhost:9292"
33+
include_examples expected_value_test, :base_url, forms_api, "http://localhost:3000"
3434
end
3535

3636
describe ".govuk_notify" do

0 commit comments

Comments
 (0)