-
Notifications
You must be signed in to change notification settings - Fork 2
adding Dockerfile. adding github action to push image to ecr. #20
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
launchdavewilliams
wants to merge
8
commits into
main
Choose a base branch
from
feature/dockerize-and-ecr-push
base: main
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.
+88
−0
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1398e4a
adding Dockerfile. adding github action to push image to ecr.
launchdavewilliams 818a9cf
fixing end of line
launchdavewilliams 09aab38
Apply suggestions from code review
launchdavewilliams 24b652c
removing launch darkly private actions
launchdavewilliams f6f7101
updating repo uri to match auth
launchdavewilliams 5c8ca60
updating registry for ecr login
launchdavewilliams f3d97e0
updating dockerfile to use bun instead of npm
launchdavewilliams 6ce8032
changing GHA to only run on push to main. updating readme
launchdavewilliams 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,2 @@ | ||
.devcontainer/* | ||
.github/* |
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,41 @@ | ||
name: Docker Build and Push | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
ECR_REGISTRY: "709825985650.dkr.ecr.us-east-1.amazonaws.com/launchdarkly/mcp" | ||
jobs: | ||
build_push_image: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
id-token: write | ||
contents: read | ||
steps: | ||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
- uses: zvonimirsun/read-package-version-actions@v2 | ||
id: get-semver | ||
- uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
audience: "https://github.com/launchdarkly" | ||
role-to-assume: "arn:aws:iam::011970158519:role/mcp-server-ecr-publisher" | ||
role-session-name: "McpServerPublish" | ||
aws-region: "us-east-1" | ||
- uses: aws-actions/amazon-ecr-login@v2 | ||
with: | ||
registries: "709825985650" | ||
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1 | ||
- uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # v3.6.0 | ||
- uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0 | ||
launchdavewilliams marked this conversation as resolved.
Show resolved
Hide resolved
|
||
with: | ||
context: . | ||
file: Dockerfile | ||
platforms: linux/amd64,linux/arm64 | ||
tags: | | ||
${{ format('{0}:{1}', env.ECR_REGISTRY, steps.get-semver.outputs.version) }} | ||
labels: | | ||
org.opencontainers.image.title="mcp-server" | ||
org.opencontainers.image.description="LaunchDarkly MCP Server" | ||
org.opencontainers.image.version=${{ steps.get-semver.outputs.version }} | ||
push: ${{ github.ref == 'refs/heads/main' }} |
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,23 @@ | ||
FROM oven/bun:1-debian AS builder | ||
|
||
WORKDIR /app | ||
|
||
COPY package*.json ./ | ||
|
||
RUN bun install | ||
|
||
COPY . . | ||
|
||
RUN bun run build | ||
|
||
FROM gcr.io/distroless/nodejs24-debian12:970bec506fed86941afb61c21983f25b3b3fe68c | ||
|
||
WORKDIR /app | ||
|
||
# Copy built application from builder stage | ||
COPY --from=builder /app/dist ./dist | ||
COPY --from=builder /app/bin ./bin | ||
COPY --from=builder /app/package.json ./ | ||
|
||
EXPOSE 8080 | ||
ENTRYPOINT ["/nodejs/bin/node", "/app/bin/mcp-server.js", "start", "--transport", "sse", "--port", "8080"] |
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
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.
Uh oh!
There was an error while loading. Please reload this page.