-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add docker-compose FalkorDB, Backend, Frontend #367
Changes from 13 commits
63ba49e
58eb3b5
1912e2e
f419fe6
8d2e6ec
c4eb6b8
d639e7c
ec73ee4
12d3466
cebdd83
fb783b1
a4b6e33
b542f2d
46bd62b
8f05cf8
a7c282d
7b9acf6
e6972d4
e2f506e
aaedf00
451b02d
8f4343c
bbe2070
6a37813
44282ad
364ace5
0fefd04
c214063
681e655
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: Release image to DockerHub | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: ["v*.*.*"] | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build-and-release: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set tags | ||
run: | | ||
if ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}; then | ||
echo "TAGS=falkordb/code-graph-frontend:latest,falkordb/code-graph-frontend:${{ github.ref_name }}" >> $GITHUB_ENV | ||
else | ||
echo "TAGS=falkordb/code-graph-frontend:edge" >> $GITHUB_ENV | ||
fi | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v3 | ||
with: | ||
username: ${{ secrets.DOCKER_USERNAME }} | ||
password: ${{ secrets.DOCKER_PASSWORD }} | ||
|
||
- name: Build image | ||
uses: docker/build-push-action@v5 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: true | ||
tags: ${{ env.TAGS }} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Use a Node.js base image | ||
FROM node:20 | ||
FROM node:22 | ||
|
||
# Set working directory | ||
WORKDIR /app | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
version: "3.9" | ||
|
||
services: | ||
falkordb: | ||
image: falkordb/falkordb:latest | ||
ports: | ||
- "6379:6379" | ||
- "3001:3000" | ||
volumes: | ||
- ./:/data/ | ||
stdin_open: true # Keep the container's STDIN open | ||
tty: true # Allocate a pseudo-TTY | ||
|
||
code-graph-frontend: | ||
image: falkordb/code-graph-frontend:latest | ||
ports: | ||
- "3000:3000" | ||
depends_on: | ||
- code-graph-backend | ||
environment: | ||
- BACKEND_URL=http://code-graph-backend:5000 # Backend service URL | ||
- SECRET_TOKEN=Vespa | ||
|
||
Comment on lines
+14
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security concerns in the Frontend service configuration.
Consider applying these changes: code-graph-frontend:
- image: falkordb/code-graph-frontend:latest
+ image: falkordb/code-graph-frontend:1.0.0 # Replace with specific version
ports:
- "3000:3000"
depends_on:
- code-graph-backend
environment:
- - BACKEND_URL=http://code-graph-backend:5000
+ - BACKEND_URL=${BACKEND_URL:-https://code-graph-backend:5000}
- - SECRET_TOKEN=Vespa
+ - SECRET_TOKEN=${SECRET_TOKEN} # Set via .env file or environment Create a BACKEND_URL=https://code-graph-backend:5000
SECRET_TOKEN=your-secure-token-here |
||
code-graph-backend: | ||
image: falkordb/code-graph-backend:latest | ||
ports: | ||
- "4000:5000" | ||
depends_on: | ||
- falkordb | ||
environment: | ||
- FALKORDB_HOST=falkordb | ||
- FALKORDB_PORT=6379 | ||
- OPENAI_API_KEY=YOUR_OPENAI_API_KEY | ||
- SECRET_TOKEN=Vespa | ||
- FLASK_RUN_HOST=0.0.0.0 | ||
- FLASK_RUN_PORT=5000 | ||
Comment on lines
+24
to
+36
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Critical security and reliability concerns in the Backend service configuration.
Consider applying these changes: code-graph-backend:
- image: falkordb/code-graph-backend:latest
+ image: falkordb/code-graph-backend:1.0.0 # Replace with specific version
ports:
- "4000:5000"
depends_on:
- falkordb
+ healthcheck:
+ test: ["CMD", "curl", "-f", "http://localhost:5000/health"]
+ interval: 30s
+ timeout: 10s
+ retries: 3
environment:
- FALKORDB_HOST=falkordb
- FALKORDB_PORT=6379
- - OPENAI_API_KEY=YOUR_OPENAI_API_KEY
+ - OPENAI_API_KEY=${OPENAI_API_KEY}
- - SECRET_TOKEN=Vespa
+ - SECRET_TOKEN=${SECRET_TOKEN}
- FLASK_RUN_HOST=0.0.0.0
- FLASK_RUN_PORT=5000 Add these variables to your OPENAI_API_KEY=your-openai-api-key |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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.
Several critical issues in the FalkorDB service configuration need attention.
latest
tag is not recommended for production as it can lead to unexpected changes during deployments../:/data/
exposes the entire current directory, which could include sensitive files.3001:3000
might conflict with the frontend's port 3000.Consider applying these changes: