Fix port's default value in external-composition docker image (#1190)

This commit is contained in:
Kamil Kisiela 2023-01-31 00:06:30 +01:00 committed by GitHub
parent ab38a700ee
commit 2a93f67c44
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -5,7 +5,7 @@
"private": true,
"scripts": {
"build": "bob runify --single",
"dev": "tsup-node src/dev.ts --format esm --shims --target node18 --watch --sourcemap --onSuccess 'node --enable-source-maps dist/dev.js' | pino-pretty --translateTime HH:MM:ss TT --ignore pid,hostname"
"dev": "tsup-node src/index.ts --format esm --shims --target node18 --watch --sourcemap --onSuccess 'node --enable-source-maps dist/index.js' | pino-pretty --translateTime HH:MM:ss TT --ignore pid,hostname"
},
"dependencies": {
"@apollo/composition": "^2.2.2",

View file

@ -11,7 +11,7 @@ const BaseSchema = zod.object({
NODE_ENV: zod.string().default('production'),
ENVIRONMENT: zod.string().default('production'),
RELEASE: zod.string().default(''),
PORT: zod.coerce.number(),
PORT: zod.coerce.number().default(3069),
SECRET: zod.string(),
});
@ -40,7 +40,7 @@ export function resolveEnv(env: Record<string, string | undefined>) {
environment: base.ENVIRONMENT,
release: base.RELEASE ?? 'local',
http: {
port: base.PORT ?? 3069,
port: base.PORT,
},
secret: base.SECRET,
};

View file

@ -260,7 +260,7 @@ will be used as private key to hash the requests to your composition service.
To run the container, you can use the following command:
```
docker run -p 3069 -e SECRET="MY_SECRET_HERE" ghcr.io/kamilkisiela/graphql-hive/composition-federation-2
docker run -p 3069:3069 -e SECRET="MY_SECRET_HERE" ghcr.io/kamilkisiela/graphql-hive/composition-federation-2
```
You should make this service publicly available, and then configure it in Hive platform (see