Skip to content

Commit 5db609d

Browse files
committed
refactor(compose): build prod images and override for dev
1 parent 7349cf0 commit 5db609d

File tree

3 files changed

+4
-17
lines changed

3 files changed

+4
-17
lines changed

backend/api/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ COPY ./envs/backend.env /opt/.env
88
COPY ./backend/api /app/api
99
COPY ./backend/shared_mcp /app/shared_mcp
1010
ENV PYTHONPATH /app:$PYTHONPATH
11+
ENTRYPOINT ["uv", "run", "fastapi", "run", "api/main.py"]

backend/mcp/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1010
COPY ./backend/mcp ./mcp
1111
COPY ./backend/shared_mcp ./shared_mcp
1212
ENV PYTHONPATH /app:$PYTHONPATH
13+
ENTRYPOINT ["uv", "run", "mcp/main.py"]

compose-dev.yaml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
api:
3-
image: api:dev
3+
image: api:prod
44
build:
55
context: .
66
dockerfile: ./backend/api/Dockerfile
@@ -15,27 +15,12 @@ services:
1515
- ./backend/shared_mcp:/app/shared_mcp
1616

1717
mcp:
18-
image: mcp:dev
18+
image: mcp:prod
1919
build:
2020
context: .
2121
dockerfile: ./backend/mcp/Dockerfile
2222
env_file:
2323
- ./envs/shared_mcp.env
24-
entrypoint: bash -c "uv run mcp/main.py"
2524
volumes:
2625
- ./backend/mcp:/app/mcp
2726
- ./backend/shared_mcp:/app/shared_mcp
28-
29-
api-builder:
30-
image: api:prod
31-
build:
32-
dockerfile_inline: |
33-
FROM api:dev
34-
ENTRYPOINT ["uv", "run", "fastapi", "run", "api/main.py"]
35-
36-
mcp-builder:
37-
image: mcp:prod
38-
build:
39-
dockerfile_inline: |
40-
FROM mcp:dev
41-
ENTRYPOINT ["uv", "run", "mcp/main.py"]

0 commit comments

Comments
 (0)