Skip to content

Commit 1388507

Browse files
committed
Merge branch 'develop' into ng/moving-readmes
2 parents 95b9cf5 + 7b13d77 commit 1388507

39 files changed

+1961
-896
lines changed

.dockerignore

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Ignore node_modules from the build context
2+
node_modules
3+
4+
# Ignore logs and temporary files
5+
*.log
6+
*.tmp
7+
.DS_Store
8+
9+
# Ignore Git files and metadata
10+
.gitignore
11+
12+
# Ignore IDE and editor config files
13+
.vscode
14+
.idea
15+
*.swp
16+
17+
# Ignore build artifacts from the host
18+
dist
19+
build

Dockerfile

+43-19
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,62 @@
11
# Use a specific Node.js version for better reproducibility
22
FROM node:23.3.0-slim AS builder
33

4-
# Install pnpm globally and install necessary build tools
4+
# Install pnpm globally and necessary build tools
55
RUN npm install -g pnpm@9.4.0 && \
66
apt-get update && \
7-
apt-get install -y git python3 make g++ && \
7+
apt-get upgrade -y && \
8+
apt-get install -y \
9+
git \
10+
python3 \
11+
python3-pip \
12+
curl \
13+
node-gyp \
14+
ffmpeg \
15+
libtool-bin \
16+
autoconf \
17+
automake \
18+
libopus-dev \
19+
make \
20+
g++ \
21+
build-essential \
22+
libcairo2-dev \
23+
libjpeg-dev \
24+
libpango1.0-dev \
25+
libgif-dev \
26+
openssl \
27+
libssl-dev && \
828
apt-get clean && \
929
rm -rf /var/lib/apt/lists/*
1030

1131
# Set Python 3 as the default python
12-
RUN ln -s /usr/bin/python3 /usr/bin/python
32+
RUN ln -sf /usr/bin/python3 /usr/bin/python
1333

1434
# Set the working directory
1535
WORKDIR /app
1636

17-
# Copy package.json and other configuration files
18-
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml .npmrc turbo.json ./
37+
# Copy application code
38+
COPY . .
1939

20-
# Copy the rest of the application code
21-
COPY agent ./agent
22-
COPY packages ./packages
23-
COPY scripts ./scripts
24-
COPY characters ./characters
40+
# Install dependencies
41+
RUN pnpm install --no-frozen-lockfile
2542

26-
# Install dependencies and build the project
27-
RUN pnpm install \
28-
&& pnpm build-docker \
29-
&& pnpm prune --prod
43+
# Build the project
44+
RUN pnpm run build && pnpm prune --prod
3045

31-
# Create a new stage for the final image
46+
# Final runtime image
3247
FROM node:23.3.0-slim
3348

34-
# Install runtime dependencies if needed
49+
# Install runtime dependencies
3550
RUN npm install -g pnpm@9.4.0 && \
3651
apt-get update && \
37-
apt-get install -y git python3 && \
52+
apt-get install -y \
53+
git \
54+
python3 \
55+
ffmpeg && \
3856
apt-get clean && \
3957
rm -rf /var/lib/apt/lists/*
4058

59+
# Set the working directory
4160
WORKDIR /app
4261

4362
# Copy built artifacts and production dependencies from the builder stage
@@ -47,9 +66,14 @@ COPY --from=builder /app/.npmrc ./
4766
COPY --from=builder /app/turbo.json ./
4867
COPY --from=builder /app/node_modules ./node_modules
4968
COPY --from=builder /app/agent ./agent
69+
COPY --from=builder /app/client ./client
70+
COPY --from=builder /app/lerna.json ./
5071
COPY --from=builder /app/packages ./packages
5172
COPY --from=builder /app/scripts ./scripts
5273
COPY --from=builder /app/characters ./characters
5374

54-
# Set the command to run the application
55-
CMD ["pnpm", "start"]
75+
# Expose necessary ports
76+
EXPOSE 3000 5173
77+
78+
# Command to start the application
79+
CMD ["sh", "-c", "pnpm start & pnpm start:client"]

Dockerfile.docs

+8-28
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,43 @@
11
# syntax=docker/dockerfile:1
22

3-
## Modified version of https://docusaurus.community/knowledge/deployment/docker/
4-
53
# Stage 1: Base image.
64
## Start with a base image containing NodeJS so we can build Docusaurus.
75
FROM node:23.3.0-slim AS base
86
## Disable colour output from yarn to make logs easier to read.
9-
10-
## https://pnpm.io/docker
11-
ENV PNPM_HOME="/pnpm"
12-
ENV PATH="$PNPM_HOME:$PATH"
13-
147
ENV FORCE_COLOR=0
158
## Enable corepack.
169
RUN corepack enable
1710
## Set the working directory to `/opt/docusaurus`.
1811
WORKDIR /opt/docusaurus
1912

20-
## Required by docusaurus: [ERROR] Loading of version failed for version current
21-
RUN apt-get update && apt-get install -y git
22-
13+
# Stage 2a: Development mode.
2314
FROM base AS dev
2415
## Set the working directory to `/opt/docusaurus`.
2516
WORKDIR /opt/docusaurus
2617
## Expose the port that Docusaurus will run on.
2718
EXPOSE 3000
2819
## Run the development server.
29-
CMD [ -d "node_modules" ] && npm run start -- --host 0.0.0.0 --poll 1000 || pnpm install && pnpm run start -- --host 0.0.0.0 --poll 1000
20+
CMD [ -d "node_modules" ] && pnpm start -- --host 0.0.0.0 --poll 1000 || pnpm install && pnpm start -- --host 0.0.0.0 --poll 1000
3021

3122
# Stage 2b: Production build mode.
32-
FROM base AS preprod
23+
FROM base AS prod
3324
## Set the working directory to `/opt/docusaurus`.
3425
WORKDIR /opt/docusaurus
3526

36-
## This is in case someone needs to build the lock file
37-
#RUN apt install python-is-python3 g++ make -y
38-
39-
COPY docs/package.json /opt/docusaurus/package.json
40-
COPY docs/package-lock.json /opt/docusaurus/package-lock.json
41-
42-
FROM preprod AS prod
43-
44-
## Install dependencies with `--immutable` to ensure reproducibility.
45-
RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install
46-
47-
## Copy over the source code.
4827
COPY docs/ /opt/docusaurus/
4928
COPY packages/ /opt/packages/
5029

5130
## Required buy docusaurus [ERROR] Loading of version failed for version current
5231
COPY .git/ /opt/.git/
5332

54-
# Build from sources
55-
RUN pnpm run build
33+
## Install dependencies with `--frozen-lockfile` to ensure reproducibility.
34+
RUN pnpm install --no-frozen-lockfile
35+
## Build the static site.
36+
RUN pnpm build
5637

5738
# Stage 3a: Serve with `docusaurus serve`.
5839
FROM prod AS serve
5940
## Expose the port that Docusaurus will run on.
6041
EXPOSE 3000
6142
## Run the production server.
62-
CMD ["npm", "run", "serve", "--", "--host", "0.0.0.0", "--no-open"]
63-
43+
CMD ["pnpm", "run", "serve", "--host", "0.0.0.0", "--no-open"]

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@ pnpm clean
9898

9999
### Interact via Browser
100100

101-
````
102101
Once the agent is running, you should see the message to run "pnpm start:client" at the end.
103-
Open another terminal and move to same directory and then run below command and follow the URL to chat to your agent.
102+
103+
Open another terminal, move to same directory, run the command below, then follow the URL to chat with your agent.
104104

105105
```bash
106106
pnpm start:client
107-
````
107+
```
108108

109109
Then read the [Documentation](https://elizaos.github.io/eliza/) to learn how to customize your Eliza.
110110

agent/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
"@elizaos/plugin-avalanche": "workspace:*",
8484
"@elizaos/plugin-video-generation": "workspace:*",
8585
"@elizaos/plugin-web-search": "workspace:*",
86+
"@elizaos/plugin-dexscreener": "workspace:*",
8687
"@elizaos/plugin-letzai": "workspace:*",
8788
"@elizaos/plugin-thirdweb": "workspace:*",
8889
"@elizaos/plugin-genlayer": "workspace:*",

agent/src/index.ts

+8-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ import { coinmarketcapPlugin } from "@elizaos/plugin-coinmarketcap";
6565
import { confluxPlugin } from "@elizaos/plugin-conflux";
6666
import { createCosmosPlugin } from "@elizaos/plugin-cosmos";
6767
import { cronosZkEVMPlugin } from "@elizaos/plugin-cronoszkevm";
68-
import { echoChambersPlugin } from "@elizaos/plugin-echochambers";
6968
import { evmPlugin } from "@elizaos/plugin-evm";
7069
import { flowPlugin } from "@elizaos/plugin-flow";
7170
import { fuelPlugin } from "@elizaos/plugin-fuel";
@@ -99,6 +98,9 @@ import { thirdwebPlugin } from "@elizaos/plugin-thirdweb";
9998
import { tonPlugin } from "@elizaos/plugin-ton";
10099
import { squidRouterPlugin } from "@elizaos/plugin-squid-router";
101100
import { webSearchPlugin } from "@elizaos/plugin-web-search";
101+
import { echoChambersPlugin } from "@elizaos/plugin-echochambers";
102+
import { dexScreenerPlugin } from "@elizaos/plugin-dexscreener";
103+
102104
import { zksyncEraPlugin } from "@elizaos/plugin-zksync-era";
103105
import Database from "better-sqlite3";
104106
import fs from "fs";
@@ -107,6 +109,7 @@ import path from "path";
107109
import { fileURLToPath } from "url";
108110
import yargs from "yargs";
109111

112+
110113
const __filename = fileURLToPath(import.meta.url); // get the resolved path to the file
111114
const __dirname = path.dirname(__filename); // get the name of the directory
112115

@@ -418,7 +421,7 @@ export function getTokenForProvider(
418421
);
419422
case ModelProviderName.OPENROUTER:
420423
return (
421-
character.settings?.secrets?.OPENROUTER ||
424+
character.settings?.secrets?.OPENROUTER_API_KEY ||
422425
settings.OPENROUTER_API_KEY
423426
);
424427
case ModelProviderName.GROK:
@@ -761,6 +764,9 @@ export async function createAgent(
761764
// character.plugins are handled when clients are added
762765
plugins: [
763766
bootstrapPlugin,
767+
getSecret(character, "DEXSCREENER_API_KEY")
768+
? dexScreenerPlugin
769+
: null,
764770
getSecret(character, "CONFLUX_CORE_PRIVATE_KEY")
765771
? confluxPlugin
766772
: null,

docker-compose.yaml

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
services:
2-
tee:
2+
eliza:
33
build:
44
context: .
55
dockerfile: Dockerfile
66
stdin_open: true
77
tty: true
88
volumes:
99
- /var/run/tappd.sock:/var/run/tappd.sock
10-
- tee:/app/packages/client-twitter/src/tweetcache
11-
- tee:/app/db.sqlite
10+
- eliza:/app/packages/client-twitter/src/tweetcache
11+
- eliza:/app/db.sqlite
1212
environment:
1313
- OPENAI_API_KEY=
1414
- REDPILL_API_KEY=
@@ -32,9 +32,11 @@ services:
3232
- HELIUS_API_KEY=
3333
- SERVER_PORT=3000
3434
- WALLET_SECRET_SALT=secret_salt
35+
# Refer to: https://github.com/elizaOS/eliza/blob/develop/.env.example for all available environment variables
3536
ports:
3637
- "3000:3000"
38+
- "5173:5173"
3739
restart: always
3840

3941
volumes:
40-
tee:
42+
eliza:

docs/package.json

+9-9
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@
1616
"write-heading-ids": "docusaurus write-heading-ids"
1717
},
1818
"dependencies": {
19-
"@docusaurus/core": "3.6.3",
20-
"@docusaurus/plugin-content-blog": "3.6.3",
21-
"@docusaurus/plugin-content-docs": "3.6.3",
22-
"@docusaurus/plugin-ideal-image": "3.6.3",
23-
"@docusaurus/preset-classic": "3.6.3",
24-
"@docusaurus/theme-mermaid": "3.6.3",
25-
"@docusaurus/theme-common": "3.6.3",
19+
"@docusaurus/core": "3.7.0",
20+
"@docusaurus/plugin-content-blog": "3.7.0",
21+
"@docusaurus/plugin-content-docs": "3.7.0",
22+
"@docusaurus/plugin-ideal-image": "3.7.0",
23+
"@docusaurus/preset-classic": "3.7.0",
24+
"@docusaurus/theme-mermaid": "3.7.0",
25+
"@docusaurus/theme-common": "3.7.0",
2626
"@mdx-js/react": "3.0.1",
2727
"clsx": "2.1.1",
2828
"docusaurus-lunr-search": "3.5.0",
@@ -34,8 +34,8 @@
3434
"react-router-dom": "6.22.1"
3535
},
3636
"devDependencies": {
37-
"@docusaurus/module-type-aliases": "3.6.3",
38-
"@docusaurus/types": "3.6.3",
37+
"@docusaurus/module-type-aliases": "3.7.0",
38+
"@docusaurus/types": "3.7.0",
3939
"docusaurus-plugin-typedoc": "1.0.5",
4040
"typedoc": "0.26.11",
4141
"typedoc-plugin-markdown": "4.2.10"

i18n/readme/README_TR.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- [Node.js 23+](https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
3838
- [pnpm](https://pnpm.io/installation)
3939

40-
> **Windows Kullanıcıları İçin Not:** WSL gereklidir
40+
> **Windows Kullanıcıları İçin Not:** [WSL 2](https://learn.microsoft.com/en-us/windows/wsl/install-manual) gereklidir
4141
4242
### .env Dosyasını Düzenleyin
4343

0 commit comments

Comments
 (0)