feat: add surrealdb

This commit is contained in:
max 2024-02-08 19:45:17 +00:00
parent 3fc7b0d2dc
commit 30f736b399
3 changed files with 1900 additions and 43 deletions

1902
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@ -43,6 +43,7 @@ serenity = { version = "0.12", default-features = false, features = [
tokio = { version = "1.35", features = ["macros", "rt-multi-thread"] }
rand = "0.8.5"
walkdir = "2.4.0"
surrealdb = "1.1.1"
[[bin]]

View File

@ -10,6 +10,10 @@ projects:
remotes:
origin: git@git.weebo.fr:sandbox/BotDiscord.git
variables:
DB_PASSWORD: "bot_password_azertdsq"
DB_USER: "bot_root"
components:
- name: tools
container:
@ -28,22 +32,34 @@ components:
value: "dev-che"
- name: "PORT"
value: "5437"
- name: postgres
- name: DB_USER
value: "{{DB_USER}}"
- name: DB_PASSWORD
value: "{{DB_PASSWORD}}"
- name: surrealdb
container:
image: postgres:15
image: surrealdb/surrealdb:latest
memoryLimit: 2Gi
args:
- "start"
endpoints:
- name: postgres
targetPort: 5432
- name: surrealdb
targetPort: 8000
env:
- name: POSTGRES_USER
value: "postgres"
- name: POSTGRES_PASSWORD
value: "postgres"
- name: POSTGRES_DB
value: "postgres"
- name: PGDATA
value: /tmp/pgdata
- name: SURREAL_AUTH
value: "true"
- name: SURREAL_USER
value: "{{DB_USER}}"
- name: SURREAL_PASS
value: "{{DB_PASSWORD}}"
- name: SURREAL_PATH
value: "file:/appdata/bot.db"
volumeMounts:
- name: db-volume
path: /appdata
- name: db-volume
volume:
size: 2Gi
commands:
- id: build
exec: