Skip to content
Open
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
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.git
node_modules
**/node_modules
dist
**/dist
.DS_Store
.vscode
.claude
coverage
run
51 changes: 51 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Stage 1: Build
FROM node:22-slim AS builder

WORKDIR /usr/src/app

# Copy package files for workspaces dependency resolution
COPY package*.json ./
COPY storage-service/package*.json ./storage-service/
COPY jena-storage-service/package*.json ./jena-storage-service/
COPY ldp-service/package*.json ./ldp-service/
COPY oslc-service/package*.json ./oslc-service/
COPY oslc-client/package*.json ./oslc-client/
COPY oslc-browser/package*.json ./oslc-browser/
COPY bmm-server/package*.json ./bmm-server/
COPY bmm-server/ui/package*.json ./bmm-server/ui/

# Install workspaces dependencies
RUN npm install

# Copy the entire monorepo source code
COPY . .

# Build workspaces in dependency order
RUN npm run build --workspace=storage-service && \
npm run build --workspace=jena-storage-service && \
npm run build --workspace=ldp-service && \
npm run build --workspace=oslc-service && \
npm run build --workspace=oslc-browser && \
npm run build --workspace=bmm-server

# Build the BMM Web UI assets
WORKDIR /usr/src/app/bmm-server/ui
RUN npm install && npm run build

# Stage 2: Runtime
FROM node:22-slim

# Install curl (required for startup checks and population script)
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*

WORKDIR /usr/src/app

# Copy built workspace and node_modules from builder
COPY --from=builder /usr/src/app /usr/src/app

EXPOSE 3005

WORKDIR /usr/src/app/bmm-server
RUN chmod +x start.sh testing/populate-eurent.sh

CMD ["./start.sh"]
Comment on lines +48 to +51

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be solved by OSLC/bmm-server#1

2 changes: 1 addition & 1 deletion create-oslc-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ export interface AppEnv extends StorageEnv {
templatePath?: string;
}

const listenHost = process.env.VCAP_APP_HOST || process.env.OPENSHIFT_NODEJS_IP || config.host;
const listenHost = process.env.HOST || process.env.VCAP_APP_HOST || process.env.OPENSHIFT_NODEJS_IP || config.host;
const listenPort = Number(process.env.VCAP_APP_PORT || process.env.OPENSHIFT_NODEJS_PORT || config.port);

let scheme: string;
Expand Down
27 changes: 27 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
services:
fuseki:
image: stain/jena-fuseki:latest
container_name: fuseki
ports:
- "127.0.0.1:3030:3030"
# - "[::1]:3030:3030"
environment:
- ADMIN_PASSWORD=admin
volumes:
- ../fuseki:/fuseki
restart: unless-stopped

bmm-server:
build:
context: .
dockerfile: Dockerfile
container_name: bmm-server
ports:
- "127.0.0.1:3005:3005"
# - "[::1]:3005:3005"
environment:
- JENA_URL=http://fuseki:3030/bmm/
- HOST=0.0.0.0
depends_on:
- fuseki
restart: unless-stopped
2 changes: 1 addition & 1 deletion mrm-server/src/env.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ export interface AppEnv extends StorageEnv {
templatePath?: string;
}

const listenHost = process.env.VCAP_APP_HOST || process.env.OPENSHIFT_NODEJS_IP || config.host;
const listenHost = process.env.HOST || process.env.VCAP_APP_HOST || process.env.OPENSHIFT_NODEJS_IP || config.host;
const listenPort = Number(process.env.VCAP_APP_PORT || process.env.OPENSHIFT_NODEJS_PORT || config.port);

let scheme: string;
Expand Down
3 changes: 2 additions & 1 deletion oslc-browser/src/hooks/useOslcClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -634,8 +634,9 @@ async function fetchSameServerIncomingLinks(
export function useOslcClient(): UseOslcClientReturn {
const [connection, setConnection] = useState<ConnectionState>(() => {
const saved = loadSavedConnection();
const defaultURL = typeof window !== 'undefined' ? `${window.location.origin}/oslc` : '';
return {
serverURL: saved.serverURL ?? '',
serverURL: saved.serverURL ?? defaultURL,
username: saved.username ?? '',
Comment on lines 636 to 640
password: '',
connected: false,
Expand Down
Loading