Skip to content

Commit

Permalink
update botway full docker image, update discord temps dockerfiles
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed May 10, 2022
1 parent c1f093b commit 219046b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 15 deletions.
1 change: 1 addition & 0 deletions constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ var (
HomeDir, _ = dfs.GetHomeDirectory()
BotwayConfigFile = filepath.Join(HomeDir, ".botway", "botway.json")
BotwayConfig, Berr = ioutil.ReadFile(BotwayConfigFile)
BotConfig, Oerr = ioutil.ReadFile(".botway.yaml")

BotwayDirPath = func () string {
if runtime.GOOS == "windows" {
Expand Down
15 changes: 7 additions & 8 deletions docker/full.dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM frolvlad/alpine-glibc:alpine-3.14_glibc-2.33

### variables ###
ENV PKGS="zip unzip git curl npm build-base neofetch zsh sudo make lsof wget gcc asciidoctor ca-certificates bash-completion htop jq less llvm nano vim ruby-full ruby-dev libffi-dev"
ENV PKGS="zip unzip git curl npm rust libsodium ffmpeg cargo build-base build-dependencies abuild binutils opus autoconf automake libtool m4 youtube-dl binutils-doc gcc-doc python3-dev neofetch zsh sudo make lsof wget gcc asciidoctor ca-certificates bash-completion htop jq less llvm nano vim ruby-full ruby-dev libffi-dev"
ENV ZSHRC=".zshrc"

### install packages ###
Expand All @@ -15,9 +15,7 @@ RUN adduser -D bw \
&& chmod 0440 /etc/sudoers.d/bw

### nodejs package managers ###
RUN npm i -g npm@latest
RUN npm i -g yarn@latest
RUN npm i -g pnpm@latest
RUN npm i -g npm@latest yarn@latest pnpm@latest

### botway ###
# RUN curl -sL https://botway.web.app/get | bash
Expand All @@ -33,15 +31,16 @@ RUN zsh && \
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting && \
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions

### rust ###
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
RUN /bin/bash -c "source ~/.cargo/env"
### fleet ###
RUN curl -L get.fleet.rs | sh

### update bundler ###
RUN sudo gem update bundler

### go ###
RUN wget "https://dl.google.com/go/$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz"
RUN sudo tar -C /usr/local -xzf "$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz"
ENV GOROOT /usr/local/go/bin
ENV GOPATH /go
ENV PATH /go/bin:$PATH
RUN rm "$(curl https://go.dev/VERSION?m=text).linux-amd64.tar.gz"

Expand Down
8 changes: 4 additions & 4 deletions internal/pipes/token/discord/guilds/ids.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import (
token_shared "github.com/abdfnx/botway/internal/pipes/token"
"github.com/charmbracelet/bubbles/textinput"
tea "github.com/charmbracelet/bubbletea"
"github.com/tidwall/sjson"
"github.com/tidwall/gjson"
"github.com/tidwall/sjson"
)

type model struct {
Expand Down Expand Up @@ -41,10 +41,10 @@ func (m model) AddGuildId() {
log.Fatal(remove)
}

newBotConfig := os.WriteFile(token_shared.BotwayConfigPath, []byte(newGuild), 0644)
newBotwayConfig := os.WriteFile(token_shared.BotwayConfigPath, []byte(newGuild), 0644)

if newBotConfig != nil {
panic(newBotConfig)
if newBotwayConfig != nil {
panic(newBotwayConfig)
}

fmt.Print(constants.SUCCESS_BACKGROUND.Render("SUCCESS"))
Expand Down
2 changes: 1 addition & 1 deletion templates/discord/nodejs/assets/yarn/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ RUN apk update && \
# Add packages you want
# RUN apk add PACKAGE_NAME

RUN botway init --docker --name ${DISCORD_BOT_NAME}
RUN botway init --docker
RUN yarn

EXPOSE 8000
Expand Down
2 changes: 1 addition & 1 deletion templates/discord/rust/assets/cargo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apk update && \
# Add packages you want
# RUN apk add PACKAGE_NAME

RUN botway init --docker --name ${DISCORD_BOT_NAME}
RUN botway init --docker
RUN cargo build --release
RUN cp ./target/release/${DISCORD_BOT_NAME} .

Expand Down
2 changes: 1 addition & 1 deletion templates/discord/rust/assets/fleet/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apk update && \
# Add packages you want
# RUN apk add PACKAGE_NAME

RUN botway init --docker --name ${DISCORD_BOT_NAME}
RUN botway init --docker
RUN curl -L get.fleet.rs | sh
RUN fleet build --release
RUN cp ./target/release/${DISCORD_BOT_NAME} .
Expand Down

0 comments on commit 219046b

Please sign in to comment.