Skip to content

Commit 8a28bc6

Browse files
committed
feat: add API_EXTERNAL_URL to docker
1 parent 08d5a66 commit 8a28bc6

5 files changed

Lines changed: 11 additions & 3 deletions

File tree

docker/common-services.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ services:
3232
teams-api-common:
3333
image: voxel51/fiftyone-teams-api:v2.10.0
3434
environment:
35+
API_EXTERNAL_URL: ${FIFTYONE_API_URI}
3536
CAS_BASE_URL: ${CAS_BASE_URL:-http://teams-cas:3000/cas/api}
3637
FIFTYONE_AUTH_SECRET: ${FIFTYONE_AUTH_SECRET}
3738
FIFTYONE_DATABASE_NAME: ${FIFTYONE_DATABASE_NAME}

docker/internal-auth/env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This should be the URL your end-users will connect to
22
BASE_URL=https://example.fiftyone.ai
33

4-
# This should be set to the URI your end-users will use to connect to the API
4+
# This should be set to the URI your end-users and external orchestrators will use to connect to the API
55
# This could be the same as BASE_URL if you are using path-based routing
66
FIFTYONE_API_URI=https://example-api.fiftyone.ai
77

docker/legacy-auth/env.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ AUTH0_SECRET=
44
# This should be the URL your end-users will connect to
55
AUTH0_BASE_URL=https://example.fiftyone.ai
66

7-
# This should be set to the URI your end-users will use to connect to the API
7+
# This should be set to the URI your end-users and external orchestrators will use to connect to the API
88
# This could be the same as AUTH0_BASE_URL if you are using path-based routing
99
FIFTYONE_API_URI=https://example-api.fiftyone.ai
1010

tests/unit/compose/docker-compose-internal-auth_test.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ func (s *commonServicesInternalAuthDockerComposeTest) TestServiceEnvironment() {
256256
[]string{internalAuthComposeFile},
257257
s.dotEnvFiles,
258258
[]string{
259+
"API_EXTERNAL_URL=https://example-api.fiftyone.ai",
259260
"CAS_BASE_URL=http://teams-cas:3000/cas/api",
260261
"FIFTYONE_AUTH_SECRET=test-fiftyone-auth-secret",
261262
"FIFTYONE_DATABASE_NAME=fiftyone",
@@ -337,6 +338,7 @@ func (s *commonServicesInternalAuthDockerComposeTest) TestServiceEnvironment() {
337338
[]string{internalAuthComposePluginsFile},
338339
s.dotEnvFiles,
339340
[]string{
341+
"API_EXTERNAL_URL=https://example-api.fiftyone.ai",
340342
"CAS_BASE_URL=http://teams-cas:3000/cas/api",
341343
"FIFTYONE_AUTH_SECRET=test-fiftyone-auth-secret",
342344
"FIFTYONE_DATABASE_NAME=fiftyone",
@@ -418,6 +420,7 @@ func (s *commonServicesInternalAuthDockerComposeTest) TestServiceEnvironment() {
418420
[]string{internalAuthComposeDedicatedPluginsFile},
419421
s.dotEnvFiles,
420422
[]string{
423+
"API_EXTERNAL_URL=https://example-api.fiftyone.ai",
421424
"CAS_BASE_URL=http://teams-cas:3000/cas/api",
422425
"FIFTYONE_AUTH_SECRET=test-fiftyone-auth-secret",
423426
"FIFTYONE_DATABASE_NAME=fiftyone",

tests/unit/compose/docker-compose-legacy-auth_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const (
2727
var legacyAuthComposeFile = filepath.Join(dockerLegacyAuthDir, "compose.yaml")
2828
var legacyAuthComposePluginsFile = filepath.Join(dockerLegacyAuthDir, "compose.plugins.yaml")
2929
var legacyAuthComposeDedicatedPluginsFile = filepath.Join(dockerLegacyAuthDir, "compose.dedicated-plugins.yaml")
30-
var legacyAuthComposeDelegatedOperationsFile = filepath.Join(dockerInternalAuthDir, "compose.delegated-operators.yaml")
30+
var legacyAuthComposeDelegatedOperationsFile = filepath.Join(dockerLegacyAuthDir, "compose.delegated-operators.yaml")
3131
var legacyAuthEnvTemplateFilePath = filepath.Join(dockerLegacyAuthDir, "env.template")
3232

3333
type commonServicesLegacyAuthDockerComposeTest struct {
@@ -256,6 +256,7 @@ func (s *commonServicesLegacyAuthDockerComposeTest) TestServiceEnvironment() {
256256
[]string{legacyAuthComposeFile},
257257
s.dotEnvFiles,
258258
[]string{
259+
"API_EXTERNAL_URL=https://example-api.fiftyone.ai",
259260
"CAS_BASE_URL=http://teams-cas:3000/cas/api",
260261
"FIFTYONE_AUTH_SECRET=test-fiftyone-auth-secret",
261262
"FIFTYONE_DATABASE_NAME=fiftyone",
@@ -335,6 +336,7 @@ func (s *commonServicesLegacyAuthDockerComposeTest) TestServiceEnvironment() {
335336
[]string{legacyAuthComposeFile},
336337
s.dotEnvFiles,
337338
[]string{
339+
"API_EXTERNAL_URL=https://example-api.fiftyone.ai",
338340
"CAS_BASE_URL=http://teams-cas:3000/cas/api",
339341
"FIFTYONE_AUTH_SECRET=test-fiftyone-auth-secret",
340342
"FIFTYONE_DATABASE_NAME=fiftyone",
@@ -415,6 +417,7 @@ func (s *commonServicesLegacyAuthDockerComposeTest) TestServiceEnvironment() {
415417
[]string{legacyAuthComposePluginsFile},
416418
s.dotEnvFiles,
417419
[]string{
420+
"API_EXTERNAL_URL=https://example-api.fiftyone.ai",
418421
"CAS_BASE_URL=http://teams-cas:3000/cas/api",
419422
"FIFTYONE_AUTH_SECRET=test-fiftyone-auth-secret",
420423
"FIFTYONE_DATABASE_NAME=fiftyone",
@@ -495,6 +498,7 @@ func (s *commonServicesLegacyAuthDockerComposeTest) TestServiceEnvironment() {
495498
[]string{legacyAuthComposeDedicatedPluginsFile},
496499
s.dotEnvFiles,
497500
[]string{
501+
"API_EXTERNAL_URL=https://example-api.fiftyone.ai",
498502
"CAS_BASE_URL=http://teams-cas:3000/cas/api",
499503
"FIFTYONE_AUTH_SECRET=test-fiftyone-auth-secret",
500504
"FIFTYONE_DATABASE_NAME=fiftyone",

0 commit comments

Comments
 (0)