File tree Expand file tree Collapse file tree 5 files changed +7
-2
lines changed Expand file tree Collapse file tree 5 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import { standardValidate } from "@hoalu/common/standard-validate";
2
2
import { type } from "arktype" ;
3
3
4
4
export const envSchema = type ( {
5
- AUTH_SECRET : "string" ,
5
+ AUTH_SECRET : "string > 0 " ,
6
6
AUTH_URL : "string.url" ,
7
7
DB_HOST : "string > 0" ,
8
8
DB_NAME : "string > 0" ,
@@ -18,6 +18,7 @@ export const envSchema = type({
18
18
S3_SECRET_KEY : "string > 0" ,
19
19
S3_BUCKET : "string > 0" ,
20
20
S3_ENDPOINT : "string > 0" ,
21
+ SYNC_SECRET : "string > 0" ,
21
22
SYNC_URL : "string.url" ,
22
23
} ) ;
23
24
Original file line number Diff line number Diff line change @@ -30,6 +30,8 @@ export function syncModule() {
30
30
searchParams . forEach ( ( value , key ) => {
31
31
shapeUrl . searchParams . set ( key , value ) ;
32
32
} ) ;
33
+ // ELECTRIC_SECRET
34
+ shapeUrl . searchParams . set ( "api_secret" , process . env . SYNC_SECRET ) ;
33
35
34
36
const electricResponse = await fetch ( shapeUrl . toString ( ) ) ;
35
37
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ services:
27
27
environment :
28
28
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@database:5432/${DB_NAME}?sslmode=disable
29
29
- ELECTRIC_PORT=4000
30
+ - ELECTRIC_SECRET=${SYNC_SECRET}
30
31
ports :
31
32
- 4000:4000
32
33
depends_on :
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ services:
36
36
environment :
37
37
- DATABASE_URL=postgresql://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:5432/${DB_NAME}?sslmode=disable
38
38
- ELECTRIC_PORT=4000
39
+ - ELECTRIC_SECRET=${SYNC_SECRET}
39
40
depends_on :
40
41
- database
41
42
volumes :
Original file line number Diff line number Diff line change 1
1
FROM oven/bun:1.2.5-alpine
2
2
WORKDIR /migrations
3
3
4
- RUN bun install drizzle-orm drizzle-kit postgres
4
+ RUN bun install drizzle-orm drizzle-kit pg
5
5
COPY ./apps/api/drizzle.config.ts .
6
6
COPY ./apps/api/src/db/schema.ts ./src/db/schema.ts
7
7
COPY ./apps/api/migrations ./migrations
You can’t perform that action at this time.
0 commit comments