-
Notifications
You must be signed in to change notification settings - Fork 0
feat: containerize setup with docker-compose and support HOST environment variable #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
berezovskyi
wants to merge
1
commit into
master
Choose a base branch
from
feature/docker-compose-automation
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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"] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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