Skip to content

Commit

Permalink
chore: ssl
Browse files Browse the repository at this point in the history
  • Loading branch information
itsjoeoui committed Apr 29, 2024
1 parent dfc8945 commit 121ceae
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion apps/server/src/db/kysely.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import { Pool, types } from "pg";
import { DB } from "@cloud/shared";

export const pool = new Pool({
connectionString: env.DATABASE_URL,
connectionString:
env.DATABASE_URL + env.NODE_ENV === "production" ? "?sslmode=require" : "",
});

// NOTE: Return bigint as number instead of string
Expand Down
4 changes: 2 additions & 2 deletions terraform/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ resource "azurerm_storage_share" "caddy-storage-share" {
}

resource "azurerm_postgresql_flexible_server" "flojoy-cloud-postgres-server" {
name = "flojoy-cloud-postgres-server"
name = "flojoy-cloud-postgres-flexible-server"
resource_group_name = azurerm_resource_group.flojoy-cloud-rg.name
location = azurerm_resource_group.flojoy-cloud-rg.location
version = 12
Expand All @@ -148,7 +148,7 @@ resource "azurerm_postgresql_flexible_server_configuration" "flojoy-cloud-postgr
}

resource "azurerm_postgresql_flexible_server_database" "flojoy-cloud-postgres-db" {
name = "flojoy-cloud-postgres-db"
name = "flojoy-cloud-postgres-flexible-db"
server_id = azurerm_postgresql_flexible_server.flojoy-cloud-postgres-server.id
charset = "utf8"
collation = "en_US.utf8"
Expand Down

0 comments on commit 121ceae

Please sign in to comment.