Skip to content

Commit 058d091

Browse files
committed
work
1 parent 7e4e4dc commit 058d091

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

docker-compose.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
services:
2+
db:
3+
image: timescale/timescaledb-ha:pg17
4+
environment:
5+
- POSTGRES_USER=postgres
6+
- POSTGRES_PASSWORD=postgres
7+
ports:
8+
- "5432:5432"
9+
volumes:
10+
- db_data:/home/postgres/pgdata/data
11+
healthcheck:
12+
test: ["CMD-SHELL", "pg_isready -U postgres -d postgres"]
13+
interval: 1s
14+
timeout: 5s
15+
retries: 50
16+
17+
app:
18+
build:
19+
context: .
20+
target: builder
21+
depends_on:
22+
db:
23+
condition: service_healthy
24+
env_file: .env
25+
ports:
26+
- "3020:3001"
27+
volumes:
28+
- ./migrations:/app/migrations
29+
- ./src:/app/src
30+
- ./package.json:/app/package.json
31+
- ./package-lock.json:/app/package-lock.json
32+
- ./tsconfig.json:/app/tsconfig.json
33+
command: npm run watch
34+
35+
36+
volumes:
37+
db_data:

src/migrate.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ const createStateStore = () => {
3434

3535
// Ensure migrations table exists
3636
await client.query(/* sql */ `
37-
CREATE SCHEMA IF NOT EXISTS ${schema};
38-
3937
CREATE TABLE IF NOT EXISTS ${schema}.migrations (
4038
id SERIAL PRIMARY KEY,
4139
set JSONB NOT NULL,

0 commit comments

Comments
 (0)