Skip to content

Commit

Permalink
Merge pull request #429 from refly-ai/fix/docker-deploy-issues
Browse files Browse the repository at this point in the history
fix(docker): deployment issues with minio and elasticsearch
  • Loading branch information
mrcfps authored Jan 27, 2025
2 parents b30ab38 + e22c025 commit 7d4a4d4
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 29 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build-es-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build Elasticsearch Image

on:
workflow_dispatch:

jobs:
build-and-push:
name: Build Elasticsearch Image
runs-on: ubuntu-latest
if: github.repository == 'refly-ai/refly'
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: reflyai
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./deploy/docker/elasticsearch/Dockerfile
platforms: linux/amd64,linux/arm64
push: true
tags: |
reflyai/elasticsearch:7.10.2
26 changes: 13 additions & 13 deletions apps/api/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ ELASTICSEARCH_USERNAME=
ELASTICSEARCH_PASSWORD=

# MinIO Configuration
MINIO_INTERNAL_ENDPOINT=localhost
MINIO_INTERNAL_PORT=9000
MINIO_INTERNAL_USE_SSL=false
MINIO_INTERNAL_ACCESS_KEY=minioadmin
MINIO_INTERNAL_SECRET_KEY=minioadmin
MINIO_INTERNAL_BUCKET=refly-weblink

MINIO_EXTERNAL_ENDPOINT=localhost
MINIO_EXTERNAL_PORT=9000
MINIO_EXTERNAL_USE_SSL=false
MINIO_EXTERNAL_ACCESS_KEY=minioadmin
MINIO_EXTERNAL_SECRET_KEY=minioadmin
MINIO_EXTERNAL_BUCKET=refly-weblink
MINIO_INTERNAL_ENDPOINT=
MINIO_INTERNAL_PORT=
MINIO_INTERNAL_USE_SSL=
MINIO_INTERNAL_ACCESS_KEY=
MINIO_INTERNAL_SECRET_KEY=
MINIO_INTERNAL_BUCKET=

MINIO_EXTERNAL_ENDPOINT=
MINIO_EXTERNAL_PORT=
MINIO_EXTERNAL_USE_SSL=
MINIO_EXTERNAL_ACCESS_KEY=
MINIO_EXTERNAL_SECRET_KEY=
MINIO_EXTERNAL_BUCKET=

# Authentication Configuration
AUTH_SKIP_VERIFICATION=true
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Sentry.init({
async function bootstrap() {
const app = await NestFactory.create<NestExpressApplication>(AppModule, {
rawBody: true,
bufferLogs: true,
bufferLogs: false,
});
app.useLogger(app.get(Logger));

Expand Down
26 changes: 13 additions & 13 deletions deploy/docker/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,19 @@ ELASTICSEARCH_USERNAME=
ELASTICSEARCH_PASSWORD=

# MinIO Configuration
MINIO_INTERNAL_ENDPOINT=localhost
MINIO_INTERNAL_PORT=9000
MINIO_INTERNAL_USE_SSL=false
MINIO_INTERNAL_ACCESS_KEY=minioadmin
MINIO_INTERNAL_SECRET_KEY=minioadmin
MINIO_INTERNAL_BUCKET=refly-weblink

MINIO_EXTERNAL_ENDPOINT=localhost
MINIO_EXTERNAL_PORT=9000
MINIO_EXTERNAL_USE_SSL=false
MINIO_EXTERNAL_ACCESS_KEY=minioadmin
MINIO_EXTERNAL_SECRET_KEY=minioadmin
MINIO_EXTERNAL_BUCKET=refly-weblink
MINIO_INTERNAL_ENDPOINT=
MINIO_INTERNAL_PORT=
MINIO_INTERNAL_USE_SSL=
MINIO_INTERNAL_ACCESS_KEY=
MINIO_INTERNAL_SECRET_KEY=
MINIO_INTERNAL_BUCKET=

MINIO_EXTERNAL_ENDPOINT=
MINIO_EXTERNAL_PORT=
MINIO_EXTERNAL_USE_SSL=
MINIO_EXTERNAL_ACCESS_KEY=
MINIO_EXTERNAL_SECRET_KEY=
MINIO_EXTERNAL_BUCKET=

# Authentication Configuration
AUTH_SKIP_VERIFICATION=true
Expand Down
2 changes: 1 addition & 1 deletion deploy/docker/docker-compose.middleware.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ services:
restart: always
elasticsearch:
container_name: refly_elasticsearch
image: docker.elastic.co/elasticsearch/elasticsearch:7.10.2
image: reflyai/elasticsearch:7.10.2
ports:
- 9200:9200
environment:
Expand Down
3 changes: 2 additions & 1 deletion deploy/docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ services:
env_file:
- .env
environment:
- MINIO_ENDPOINT=http://minio
- MINIO_INTERNAL_ENDPOINT=minio
- MINIO_EXTERNAL_ENDPOINT=minio
- REDIS_HOST=redis
- DATABASE_URL=postgresql://refly:test@db:5432/refly?schema=refly
- QDRANT_HOST=qdrant
Expand Down
4 changes: 4 additions & 0 deletions deploy/docker/elasticsearch/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM docker.elastic.co/elasticsearch/elasticsearch:7.10.2

# Install ICU Analysis plugin
RUN elasticsearch-plugin install analysis-icu --batch

0 comments on commit 7d4a4d4

Please sign in to comment.