Skip to content

Commit 921c755

Browse files
authored
v0.3.40: drizzle fixes, custom postgres port support
2 parents 9213202 + 41ec75f commit 921c755

File tree

7 files changed

+14
-22
lines changed

7 files changed

+14
-22
lines changed

.devcontainer/docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ services:
99
command: sleep infinity
1010
environment:
1111
- NODE_ENV=development
12-
- DATABASE_URL=postgresql://postgres:postgres@db:${POSTGRES_PORT:-5432}/simstudio
13-
- POSTGRES_URL=postgresql://postgres:postgres@db:${POSTGRES_PORT:-5432}/simstudio
12+
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
13+
- POSTGRES_URL=postgresql://postgres:postgres@db:5432/simstudio
1414
- BETTER_AUTH_URL=http://localhost:3000
1515
- NEXT_PUBLIC_APP_URL=http://localhost:3000
1616
- BUN_INSTALL_CACHE_DIR=/home/bun/.bun/cache
@@ -39,7 +39,7 @@ services:
3939
command: sleep infinity
4040
environment:
4141
- NODE_ENV=development
42-
- DATABASE_URL=postgresql://postgres:postgres@db:${POSTGRES_PORT:-5432}/simstudio
42+
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
4343
- BETTER_AUTH_URL=http://localhost:3000
4444
- NEXT_PUBLIC_APP_URL=http://localhost:3000
4545
depends_on:
@@ -60,7 +60,7 @@ services:
6060
context: ..
6161
dockerfile: docker/db.Dockerfile
6262
environment:
63-
- DATABASE_URL=postgresql://postgres:postgres@db:${POSTGRES_PORT:-5432}/simstudio
63+
- DATABASE_URL=postgresql://postgres:postgres@db:5432/simstudio
6464
depends_on:
6565
db:
6666
condition: service_healthy

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,5 +74,4 @@ jobs:
7474
working-directory: ./apps/sim
7575
env:
7676
DATABASE_URL: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_URL || secrets.STAGING_DATABASE_URL }}
77-
DATABASE_SSL_CERT: ${{ github.ref == 'refs/heads/main' && secrets.DATABASE_SSL_CERT || '' }}
7877
run: bunx drizzle-kit migrate

apps/sim/drizzle.config.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,5 @@ export default {
77
dialect: 'postgresql',
88
dbCredentials: {
99
url: env.DATABASE_URL,
10-
ssl: env.DATABASE_SSL_CERT
11-
? {
12-
rejectUnauthorized: false,
13-
ca: env.DATABASE_SSL_CERT,
14-
}
15-
: undefined,
1610
},
1711
} satisfies Config

apps/sim/lib/env.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ export const env = createEnv({
1616

1717
server: {
1818
// Core Database & Authentication
19-
DATABASE_URL: z.string().url(), // Primary database connection string (without SSL cert)
20-
DATABASE_SSL_CERT: z.string().optional(), // SSL certificate content for database connection
19+
DATABASE_URL: z.string().url(), // Primary database connection string
2120
BETTER_AUTH_URL: z.string().url(), // Base URL for Better Auth service
2221
BETTER_AUTH_SECRET: z.string().min(32), // Secret key for Better Auth JWT signing
2322
DISABLE_REGISTRATION: z.boolean().optional(), // Flag to disable new user registration

docker-compose.local.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ services:
1010
limits:
1111
memory: 8G
1212
environment:
13-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
13+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
1414
- BETTER_AUTH_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
1515
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
1616
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
@@ -41,7 +41,7 @@ services:
4141
context: .
4242
dockerfile: docker/realtime.Dockerfile
4343
environment:
44-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
44+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
4545
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
4646
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
4747
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
@@ -67,7 +67,7 @@ services:
6767
context: .
6868
dockerfile: docker/db.Dockerfile
6969
environment:
70-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
70+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
7171
depends_on:
7272
db:
7373
condition: service_healthy

docker-compose.ollama.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ services:
1313
limits:
1414
memory: 8G
1515
environment:
16-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
16+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
1717
- BETTER_AUTH_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
1818
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
1919
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-sim_auth_secret_$(openssl rand -hex 16)}
@@ -43,7 +43,7 @@ services:
4343
context: .
4444
dockerfile: docker/realtime.Dockerfile
4545
environment:
46-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
46+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
4747
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
4848
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
4949
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-sim_auth_secret_$(openssl rand -hex 16)}
@@ -70,7 +70,7 @@ services:
7070
context: .
7171
dockerfile: docker/db.Dockerfile
7272
environment:
73-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
73+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
7474
depends_on:
7575
db:
7676
condition: service_healthy

docker-compose.prod.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ services:
99
limits:
1010
memory: 8G
1111
environment:
12-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
12+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
1313
- BETTER_AUTH_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
1414
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
1515
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
@@ -46,7 +46,7 @@ services:
4646
limits:
4747
memory: 4G
4848
environment:
49-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
49+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
5050
- NEXT_PUBLIC_APP_URL=${NEXT_PUBLIC_APP_URL:-http://localhost:3000}
5151
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
5252
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your_auth_secret_here}
@@ -63,7 +63,7 @@ services:
6363
migrations:
6464
image: ghcr.io/simstudioai/migrations:latest
6565
environment:
66-
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:${POSTGRES_PORT:-5432}/${POSTGRES_DB:-simstudio}
66+
- DATABASE_URL=postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-simstudio}
6767
depends_on:
6868
db:
6969
condition: service_healthy

0 commit comments

Comments
 (0)