Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/cardano-services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ name: cardano-services
- local-network@us-east-1@v1
- ops-preprod-1@us-east-1
- ops-preview-1@us-east-1
- staging-mainnet@eu-west-1@v2
- staging-mainnet@us-east-1@v2
- staging-preprod@us-east-1@v2
required: true
type: choice
Expand Down
4 changes: 0 additions & 4 deletions nix/cardano-services/deployments/asset.nix
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@
key = "username";
};
};
POSTGRES_SSL_ASSET = "true";
POSTGRES_SSL_CA_FILE_ASSET = "/tls/ca.crt";
};
};

Expand Down Expand Up @@ -88,8 +86,6 @@
key = "username";
};
};
POSTGRES_SSL = "true";
POSTGRES_SSL_CA_FILE = "/tls/ca.crt";
};
};
}
4 changes: 0 additions & 4 deletions nix/cardano-services/deployments/backend.provider.nix
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,6 @@
key = "username";
};
};
POSTGRES_SSL_DB_SYNC = "true";
POSTGRES_SSL_CA_FILE_DB_SYNC = "/tls/ca.crt";
}
// lib.optionalAttrs values.backend.passHandleDBArgs {
POSTGRES_POOL_MAX_HANDLE = "10";
Expand All @@ -78,8 +76,6 @@
key = "username";
};
};
POSTGRES_SSL_HANDLE = "true";
POSTGRES_SSL_CA_FILE_HANDLE = "/tls/ca.crt";
};
};
}
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,9 @@
key = "username";
};
};
POSTGRES_SSL_DB_SYNC = "true";
POSTGRES_SSL_CA_FILE_DB_SYNC = "/tls/ca.crt";
};
volumeMounts = [
{
mountPath = "/tls";
name = "tls";
}
];
}
];
volumes.tls.secret.secretName = "postgresql-server-cert";
};
};
};
Expand Down
2 changes: 0 additions & 2 deletions nix/cardano-services/deployments/chain-history.nix
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@
key = "username";
};
};
POSTGRES_SSL_DB_SYNC = "true";
POSTGRES_SSL_CA_FILE_DB_SYNC = "/tls/ca.crt";
};
};
}
4 changes: 2 additions & 2 deletions nix/cardano-services/deployments/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -512,12 +512,12 @@ in
};
};

"staging-mainnet@eu-west-1@v2" = final: {
"staging-mainnet@us-east-1@v2" = final: {
name = "${final.namespace}-cardanojs-v2";
namespace = "staging-mainnet";
context = "eks-devs";
network = "mainnet";
region = "eu-west-1";
region = "us-east-1";

providers = {
backend = {
Expand Down
6 changes: 0 additions & 6 deletions nix/cardano-services/deployments/handle.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@
SERVICE_NAMES = "handle";
NODE_ENV = values.cardano-services.nodeEnv;

ALLOWED_ORIGINS = values.backend.allowedOrigins;

POSTGRES_POOL_MAX_HANDLE = "10";
POSTGRES_HOST_HANDLE = values.postgresName;
POSTGRES_PORT_HANDLE = "5432";
Expand All @@ -46,8 +44,6 @@
key = "username";
};
};
POSTGRES_SSL_HANDLE = "true";
POSTGRES_SSL_CA_FILE_HANDLE = "/tls/ca.crt";
};
};

Expand Down Expand Up @@ -88,8 +84,6 @@
key = "username";
};
};
POSTGRES_SSL = "true";
POSTGRES_SSL_CA_FILE = "/tls/ca.crt";
};
};
}
11 changes: 0 additions & 11 deletions nix/cardano-services/deployments/pg-boss-worker-deployment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@
key = "username";
};
};
POSTGRES_SSL_STAKE_POOL = "true";
POSTGRES_SSL_CA_FILE_STAKE_POOL = "/tls/ca.crt";

POSTGRES_POOL_MAX_DB_SYNC = "5";
POSTGRES_HOST_DB_SYNC = values.postgresName;
Expand All @@ -85,21 +83,12 @@
key = "username";
};
};
POSTGRES_SSL_DB_SYNC = "true";
POSTGRES_SSL_CA_FILE_DB_SYNC = "/tls/ca.crt";
}
// lib.optionalAttrs (values.pg-boss-worker ? env) values.pg-boss-worker.env
// lib.optionalAttrs (values.pg-boss-worker.metadata-fetch-mode == "smash") {
SMASH_URL = values.pg-boss-worker.smash-url;
});
volumeMounts = [
{
mountPath = "/tls";
name = "tls";
}
];
};
volumes.tls.secret.secretName = "postgresql-server-cert";
};
};
};
Expand Down
8 changes: 0 additions & 8 deletions nix/cardano-services/deployments/projector.resource.nix
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,7 @@ in {
runAsUser = 0;
runAsGroup = 0;
};

volumeMounts = [
{
name = "tls";
mountPath = "/tls";
}
];
};
volumes.tls.secret.secretName = "postgresql-server-cert";
};
};
};
Expand Down
7 changes: 0 additions & 7 deletions nix/cardano-services/deployments/provider.resource.nix
Original file line number Diff line number Diff line change
Expand Up @@ -88,14 +88,7 @@ in {
runAsGroup = 0;
};

volumeMounts = [
{
name = "tls";
mountPath = "/tls";
}
];
};
volumes.tls.secret.secretName = "postgresql-server-cert";
};
};
};
Expand Down
6 changes: 0 additions & 6 deletions nix/cardano-services/deployments/stake-pool.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
TOKEN_METADATA_SERVER_URL = values.cardano-services.tokenMetadataServerUrl;
NODE_ENV = values.cardano-services.nodeEnv;

ALLOWED_ORIGINS = values.backend.allowedOrigins;

POSTGRES_POOL_MAX_STAKE_POOL = "10";
POSTGRES_HOST_STAKE_POOL = values.postgresName;
POSTGRES_PORT_STAKE_POOL = "5432";
Expand All @@ -49,8 +47,6 @@
key = "username";
};
};
POSTGRES_SSL_STAKE_POOL = "true";
POSTGRES_SSL_CA_FILE_STAKE_POOL = "/tls/ca.crt";
};
};

Expand Down Expand Up @@ -90,8 +86,6 @@
key = "username";
};
};
POSTGRES_SSL = "true";
POSTGRES_SSL_CA_FILE = "/tls/ca.crt";
};
};
}
2 changes: 0 additions & 2 deletions nix/cardano-services/deployments/wallet-api.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@
key = "username";
};
};
POSTGRES_SSL = "true";
POSTGRES_SSL_CA_FILE = "/tls/ca.crt";
};
};
}
9 changes: 0 additions & 9 deletions nix/cardano-services/deployments/ws-server.deployment.nix
Original file line number Diff line number Diff line change
Expand Up @@ -67,17 +67,8 @@
key = "username";
};
};
POSTGRES_SSL_DB_SYNC = "true";
POSTGRES_SSL_CA_FILE_DB_SYNC = "/tls/ca.crt";
};
volumeMounts = [
{
mountPath = "/tls";
name = "tls";
}
];
};
volumes.tls.secret.secretName = "postgresql-server-cert";
};
};
};
Expand Down
3 changes: 2 additions & 1 deletion packages/cardano-services/src/Http/HttpServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ export class HttpServer extends RunnableModule {
protected async initializeImpl(): Promise<void> {
this.app = express();

if (this.#config.allowedOrigins) {
this.logger.error('Initializing HttpServer', this.#config.allowedOrigins);
if (this.#config.allowedOrigins?.length) {
this.app.use(cors(corsOptions(new Set(this.#config.allowedOrigins))));
}

Expand Down
Loading