Skip to content

Commit

Permalink
Merge pull request #100 from ValgulNecron/dev
Browse files Browse the repository at this point in the history
Better logging and small fix
  • Loading branch information
ValgulNecron committed Feb 5, 2024
2 parents 43cd20a + 5508a75 commit 3d9366e
Show file tree
Hide file tree
Showing 129 changed files with 2,773 additions and 5,605 deletions.
18 changes: 18 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM rust:bookworm

RUN apt-get update && apt-get install -y --no-install-recommends \
libssl-dev libsqlite3-dev \
libpng-dev libjpeg-dev \
ca-certificates pkg-config \
sqlite3 curl zsh vim \
git gnupg2 jq sudo \
build-essential openssl \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /home/

COPY . .

RUN bash ./setup.sh

ENV PATH="/root/.cargo/bin:$PATH"
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"name": "Codespaces Rust Starter",
"dockerFile": "Dockerfile",
"customizations": {
"vscode": {
"settings": {
"editor.formatOnSave": true,
"extensions.ignoreRecommendations": false,
"rust-analyzer.completion.autoimport": true,
"rust-analyzer.lru.capacity": 10,
"rust-analyzer.completion.postfix.enable": true
}
}
}
}
22 changes: 22 additions & 0 deletions .devcontainer/setup.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## Install rustup and common components
curl https://sh.rustup.rs -sSf | sh -s -- -y
rustup install stable
rustup component add rustfmt
rustup component add rustfmt --toolchain stable
rustup component add clippy
rustup component add clippy --toolchain stable

cargo install cargo-expand
cargo install cargo-edit

## setup and install oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="awesomepanda"
sed -i -e "s/ZSH_THEME=.*/ZSH_THEME=\"awesomepanda\"/g" $ZSH/ohmyzsh.sh
plugins=(git zsh-interactive-cd rust)
sed -i -e "s/plugins=\(.*\)/plugins=(\1 git zsh-interactive-cd rust)/g" $ZSH/ohmyzsh.sh
cp -R /root/.oh-my-zsh /home/$USERNAME
cp /root/.zshrc /home/$USERNAME
sed -i -e "s/\/root\/.oh-my-zsh/\/home\/$USERNAME\/.oh-my-zsh/g" /home/$USERNAME/.zshrc
chown -R $USER_UID:$USER_GID /home/$USERNAME/.oh-my-zsh /home/$USERNAME/.zshrc
3 changes: 2 additions & 1 deletion .env-default
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ REMOVE_OLD_COMMAND_ON_STARTUP=True
DB_TYPE="sqlite/postgres"
SAVE_IMAGE="local/remote/false"
SAVE_SERVER="imgur/catbox"
TOKEN="catbox userhash / imgur client id"
TOKEN="catbox userhash / imgur client id"
BOT_ACTIVITY="Let you get info from anilist."
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@


Please use clippy and do not add new warning (or as little as possible)
Always add docstring to public function except for autocomplete, run and register.
Always add docstring to public function except for autocomplete, run, and register.
also add comment to "hard" thing so people know why you did this.


Expand Down
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ rust-fuzzy-search = "0.1.1"
palette = "0.7.3"
catbox = "0.8.2"
imgur = "0.7.0"
warp = "0.3.6"
tracing-appender = "0.2.3"

[profile.dev]
codegen-units = 512
Expand Down
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@ LABEL author="valgul"
LABEL "com.docker.compose.hide"="true"
LABEL hidden="true"

HEALTHCHECK CMD ps aux | grep kasuki || exit 1

WORKDIR /kasuki/

RUN apt-get update && apt-get install -y --no-install-recommends \
Expand Down
Loading

0 comments on commit 3d9366e

Please sign in to comment.