Initial commit, fully working stack
This commit is contained in:
commit
a02c6df708
6 changed files with 117 additions and 0 deletions
6
.gitignore
vendored
Normal file
6
.gitignore
vendored
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Cloned repos
|
||||||
|
jarvis-bot/
|
||||||
|
jarvis-tasks/
|
||||||
|
|
||||||
|
# Configs
|
||||||
|
config.yaml
|
23
README.md
Normal file
23
README.md
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
# JARVIS
|
||||||
|
|
||||||
|
## What is this repo?
|
||||||
|
|
||||||
|
This repository is a repo designed to self-host a full-stack JARVIS instance from the ground up with no extra work.
|
||||||
|
|
||||||
|
## How to run
|
||||||
|
|
||||||
|
To use, first create a `config.yaml` based on `config.example.yaml`
|
||||||
|
|
||||||
|
Then, run `fetch.sh` if you're on Linux/macOS, or `fetch.ps1` if you're on Windows
|
||||||
|
|
||||||
|
Finally, run `docker compose up -d`
|
||||||
|
|
||||||
|
## How to update
|
||||||
|
|
||||||
|
First, re-run `fetch.sh` or `fetch.ps1`
|
||||||
|
Then, run `docker compose up -d --build`
|
||||||
|
|
||||||
|
## Prerequisites
|
||||||
|
|
||||||
|
- git
|
||||||
|
- docker
|
29
config.example.yaml
Normal file
29
config.example.yaml
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
---
|
||||||
|
# Replace ... with actual values
|
||||||
|
token: ...
|
||||||
|
twitter:
|
||||||
|
consumer_key: ...
|
||||||
|
consumer_secret: ...
|
||||||
|
access_token: ...
|
||||||
|
access_token_secret: ...
|
||||||
|
bearer_token: ...
|
||||||
|
reddit:
|
||||||
|
client_secret: ...
|
||||||
|
client_id: ...
|
||||||
|
|
||||||
|
# Leave these values alone
|
||||||
|
mongo:
|
||||||
|
connect:
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
host: mongodb
|
||||||
|
port: 27017
|
||||||
|
database: jarvis
|
||||||
|
redis:
|
||||||
|
host: redis://cache
|
||||||
|
username:
|
||||||
|
password:
|
||||||
|
max_messages: 10000
|
||||||
|
log_level: INFO
|
||||||
|
sync: True
|
||||||
|
urls:
|
24
docker-compose.yaml
Normal file
24
docker-compose.yaml
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
cache:
|
||||||
|
image: redis
|
||||||
|
restart: always
|
||||||
|
command: redis-server --save 20 1 --loglevel warning
|
||||||
|
|
||||||
|
mongodb:
|
||||||
|
image: mongo
|
||||||
|
command: mongod
|
||||||
|
|
||||||
|
bot:
|
||||||
|
build: ./jarvis-bot
|
||||||
|
depends_on:
|
||||||
|
- cache
|
||||||
|
- mongodb
|
||||||
|
|
||||||
|
tasks:
|
||||||
|
build: ./jarvis-tasks
|
||||||
|
stop_grace_period: 5s
|
||||||
|
depends_on:
|
||||||
|
- cache
|
||||||
|
- mongodb
|
17
fetch.ps1
Normal file
17
fetch.ps1
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
if (Test-Path -Path ".\jarvis-bot") {
|
||||||
|
Push-Location ".\jarvis-bot"
|
||||||
|
git pull
|
||||||
|
Pop-Location
|
||||||
|
} else {
|
||||||
|
git clone https://git.zevaryx.com/stark-industries/jarvis/jarvis-bot.git
|
||||||
|
}
|
||||||
|
if (Test-Path -Path ".\jarvis-tasks") {
|
||||||
|
Push-Location ".\jarvis-tasks"
|
||||||
|
git pull
|
||||||
|
Pop-Location
|
||||||
|
} else {
|
||||||
|
git clone https://git.zevaryx.com/stark-industries/jarvis/jarvis-tasks.git
|
||||||
|
}
|
||||||
|
|
||||||
|
cp config.yaml .\jarvis-bot\config.yaml
|
||||||
|
cp config.yaml .\jarvis-tasks.\config.yaml
|
18
fetch.sh
Executable file
18
fetch.sh
Executable file
|
@ -0,0 +1,18 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [ ! -d jarvis-bot ]; then
|
||||||
|
git clone https://git.zevaryx.com/stark-industries/jarvis/jarvis-bot.git
|
||||||
|
else
|
||||||
|
pushd jarvis-bot
|
||||||
|
git pull
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
if [ ! -d jarvis-tasks ]; then
|
||||||
|
git clone https://git.zevaryx.com/stark-industries/jarvis/jarvis-tasks.git
|
||||||
|
else
|
||||||
|
pushd jarvis-tasks
|
||||||
|
git pull
|
||||||
|
popd
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -v config.yaml jarvis-bot/config.yaml
|
||||||
|
cp -v config.yaml jarvis-tasks/config.yaml
|
Loading…
Add table
Reference in a new issue