Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions compose.modelscan.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: bailo-prod

services:
modelscan:
volumes:
- ./lib/modelscan_api/bailo_modelscan_api:/app/bailo_modelscan_api
image: bailo_modelscan:${INSTANCE_NAME}
pull_policy: build
build:
context: ./lib/modelscan_api
target: dev
10 changes: 4 additions & 6 deletions compose.override.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,16 @@ services:
- ./backend/src:/app/src
build:
target: dev
image: bailo_backend:${INSTANCE_NAME}
pull_policy: build

frontend:
volumes:
- ./frontend:/app
build:
target: dev

modelscan:
volumes:
- ./lib/modelscan_api/bailo_modelscan_api:/app/bailo_modelscan_api
build:
target: dev
image: bailo_frontend:${INSTANCE_NAME}
pull_policy: build

minio:
environment:
Expand Down
8 changes: 8 additions & 0 deletions compose.prod.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
name: bailo-prod

services:
frontend:
image: ghcr.io/gchq/bailo_frontend:latest
pull_policy: missing
backend:
image: ghcr.io/gchq/bailo_backend:latest
pull_policy: missing
10 changes: 3 additions & 7 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,19 @@ services:
networks:
internal:
healthcheck:
test: ['CMD-SHELL', "echo 'PING' | nc -w 5 localhost 3310"]
test: ["CMD-SHELL", "echo 'PING' | nc -w 5 localhost 3310"]
interval: 30s
timeout: 10s
retries: 5

modelscan:
networks:
internal:
image: bailo_modelscan:${INSTANCE_NAME}
build:
context: ./lib/modelscan_api
image: ghcr.io/gchq/bailo_modelscan:latest
volumes:
- ./lib/modelscan_api/bailo_modelscan_api:/app/bailo_modelscan_api
healthcheck:
test: ['CMD-SHELL', 'curl --fail http://127.0.0.1:3311/info || exit 1']
test: ["CMD-SHELL", "curl --fail http://127.0.0.1:3311/info || exit 1"]
interval: 30s
timeout: 10s
retries: 5
Expand Down Expand Up @@ -87,7 +85,6 @@ services:
frontend:
networks:
internal:
image: bailo_frontend:${INSTANCE_NAME}
build:
context: ./frontend/
depends_on:
Expand All @@ -96,7 +93,6 @@ services:
backend:
networks:
internal:
image: bailo_backend:${INSTANCE_NAME}
build:
context: ./backend/
additional_contexts:
Expand Down
4 changes: 4 additions & 0 deletions lib/modelscan_api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ by using `--target dev` or `--target prod` respectively (targeting prod is optio

Note that the Docker containers run on port `3311` rather than `8000`, so adjust URLs accordingly.

When using with the wider project's docker compose structure, you can use the
[compose.modelscan.yaml](../../compose.modelscan.yaml) profile (`compose [...] -f compose.modelscan.yaml`) to switch to
the local/live development version.

## Setup

<!-- prettier-ignore-start -->
Expand Down
Loading