Skip to content

Commit af9a3a7

Browse files
committed
chore: fix docker build, add alembic, add compose deps
1 parent 2738fd0 commit af9a3a7

File tree

8 files changed

+46
-1
lines changed

8 files changed

+46
-1
lines changed

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ COPY pyproject.toml uv.lock README.md ./
2121

2222
# Copy application code
2323
COPY ./src ./src
24+
COPY ./policies ./policies
25+
COPY ./alembic ./alembic
26+
COPY ./alembic.ini ./alembic.ini
2427

2528
# Install deps (no dev deps declared; adjust if you add optional groups)
2629
RUN uv sync --no-editable

alembic.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# alembic.ini
22

33
[alembic]
4-
script_location = %(here)s/migrations
4+
script_location = %(here)s/alembic
55
prepend_sys_path = .
66
path_separator = os
77

File renamed without changes.
File renamed without changes.

docker-compose.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,50 @@ services:
33
build:
44
context: ./
55
dockerfile: Dockerfile
6+
volumes:
7+
- ./policies:/app/policies:ro
68
ports:
79
- "8001:8001"
10+
depends_on:
11+
dataset-api-migrate:
12+
condition: service_completed_successfully
13+
healthcheck:
14+
test: ["CMD", "curl", "-f", "http://localhost:8001/health"]
15+
interval: 10s
16+
timeout: 3s
17+
retries: 5
18+
extra_hosts:
19+
- "keycloak.celine.localhost:172.17.0.1"
20+
- "api.celine.localhost:172.17.0.1"
21+
22+
dataset-api-migrate:
23+
build:
24+
context: ./
25+
dockerfile: Dockerfile
26+
restart: "no"
27+
entrypoint: ["/bin/sh", "-euc"]
28+
command:
29+
- >
30+
alembic upgrade head
31+
extra_hosts:
32+
- "keycloak.celine.localhost:172.17.0.1"
33+
- "api.celine.localhost:172.17.0.1"
34+
35+
dataset-api-import:
36+
build:
37+
context: ./
38+
dockerfile: Dockerfile
39+
restart: "no"
40+
depends_on:
41+
dataset-api:
42+
condition: service_healthy
43+
entrypoint: ["/bin/sh", "-euc"]
44+
command:
45+
- >
46+
uv run dataset-cli import catalogue --input "/app/data/openlineage/*.yaml" --api-url http://api.celine.localhost/datasets --verbose || true
47+
uv run dataset-cli import catalogue --input "/app/data/postgres/*.yaml" --api-url http://api.celine.localhost/datasets --verbose || true
48+
volumes:
49+
- ./data:/app/data:ro
850
extra_hosts:
951
- "keycloak.celine.localhost:172.17.0.1"
1052
- "api.celine.localhost:172.17.0.1"

0 commit comments

Comments
 (0)