Skip to content

Commit

Permalink
Merge branch 'main' into openai-completion-like
Browse files Browse the repository at this point in the history
  • Loading branch information
amengus87 committed Jun 6, 2024
2 parents 015019b + b8da173 commit e3f5dd1
Show file tree
Hide file tree
Showing 6 changed files with 59 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"installGradle": "true",
"gradleVersion": "8.7"
},
"ghcr.io/devcontainers/features/node:1": {}
"ghcr.io/devcontainers/features/node:1": {},
"ghcr.io/devcontainers/features/docker-in-docker:2" : {}
},
"postStartCommand": ".devcontainer/postStart.sh",
"postCreateCommand": ".devcontainer/postCreate.sh",
Expand Down
35 changes: 34 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ on: push
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -37,7 +42,35 @@ jobs:
run: npm install --prefix docs && npm run build --prefix docs

- name: Build dRAGon
run: gradle build -Pversion=$(gradle cV -q -Prelease.quiet)
run: gradle bootJar -Pversion=$(gradle cV -q -Prelease.quiet)

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

- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Docker Meta Data
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/dragon-okinawa/dragon
tags: |
type=raw,value=${{ github.ref_name }},enable=true
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/main' }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

- name: Push Release
if: github.ref == 'refs/heads/main'
Expand Down
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/openjdk/jdk:17-ubuntu
LABEL org.opencontainers.image.source="https://github.com/dRAGon-Okinawa/dRAGon"

EXPOSE 1985
EXPOSE 1984

RUN mkdir /data
RUN chown app:app /data
COPY backend/build/libs/backend*.jar /dragon.jar

USER app
ENTRYPOINT ["java","-Xmx512m", "-XX:+CrashOnOutOfMemoryError","-jar","-Dspring.profiles.active=prod","/dragon.jar"]
1 change: 1 addition & 0 deletions docs/docs/commands/database-export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ java -jar backend.jar --command=database-export --output=/path/to/dump.json
```

### Using Docker
<WIPS />
```bash
docker run -v /path/to/output:/output dragon --command=database-export --output=/output/dump.json
```
Expand Down
10 changes: 7 additions & 3 deletions docs/docs/getting-started.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ Let's discover **dRAGon in less than 5 minutes**.

<WIPS />

### Gradle
### Docker
```shell
gradle bootRun
```
docker pull ghcr.io/dragon-okinawa/dragon:latest
docker run -d -p 1985:1985 -v $(pwd)/data:/data --name dragon ghcr.io/dragon-okinawa/dragon:latest
```

### Gradle
See [dRAGon Development Mode](/docs/contributing/launch-dragon-dev) for more information.
5 changes: 3 additions & 2 deletions docs/docs/integrations/librechat.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@ import WIPS from '../../src/components/Admonitions/_wip_section.mdx';

# LibreChat
## As an AI Endpoint (OpenAI compatible)
<WIPS />

```yaml
endpoints:
custom:
Expand All @@ -20,5 +18,8 @@ endpoints:
iconURL: "https://dragon.okinawa/img/dragon_okinawa_icon.png"
```
## As a LangChain.js Plugin
<WIPS />
## As an OpenAPI Plugin
<WIPS />

0 comments on commit e3f5dd1

Please sign in to comment.