Skip to content
This repository has been archived by the owner on Jul 20, 2024. It is now read-only.

Commit

Permalink
using botwayorg/railway-api pkg, add docker README
Browse files Browse the repository at this point in the history
  • Loading branch information
abdfnx committed Sep 9, 2022
1 parent e447f0c commit 91bb7b3
Show file tree
Hide file tree
Showing 21 changed files with 125 additions and 263 deletions.
4 changes: 2 additions & 2 deletions cmd/app/tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ import (

"github.com/abdfnx/botway/constants"
"github.com/abdfnx/botway/internal/railway"
rw_constants "github.com/botwayorg/railway-api/constants"
"github.com/botwayorg/railway-api/entity"
"github.com/charmbracelet/lipgloss"
rw_constants "github.com/railwayapp/cli/constants"
"github.com/railwayapp/cli/entity"
"github.com/spf13/cobra"
)

Expand Down
11 changes: 11 additions & 0 deletions docker/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Botway Docker 🐋

> Docker files for [Botway](https://github.com/abdfnx/botway) published on Dockerhub:
- `Alpine`: [**botwayorg/botway:alpine**](https://hub.docker.com/r/botwayorg/botway/tags) (default)
- `Alpine-glibc`: [**botwayorg/botway:alpine-glibc**](https://hub.docker.com/r/botwayorg/botway/tags)
- `Centos`: [**botwayorg/botway:centos**](https://hub.docker.com/r/botwayorg/botway/tags)
- `Core`: [**botwayorg/botway:core**](https://hub.docker.com/r/botwayorg/botway/tags)
- `Debian`: [**botwayorg/botway:debian**](https://hub.docker.com/r/botwayorg/botway/tags)
- `Distroless`: [**botwayorg/botway:distroless**](https://hub.docker.com/r/botwayorg/botway/tags)
- `Ubuntu`:[**botwayorg/botway:ubuntu**](https://hub.docker.com/r/botwayorg/botway/tags)
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ require (
github.com/abdfnx/resto v0.1.6
github.com/abdfnx/tran v0.1.43
github.com/botwayorg/gh v0.0.9
github.com/botwayorg/railway-api v0.0.2
github.com/briandowns/spinner v1.19.0
github.com/charmbracelet/bubbles v0.14.0
github.com/charmbracelet/bubbletea v0.22.1
Expand All @@ -21,12 +22,11 @@ require (
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d
github.com/muesli/reflow v0.3.0
github.com/muesli/termenv v0.12.0
github.com/railwayapp/cli v1.8.4
github.com/spf13/cobra v1.5.0
github.com/spf13/viper v1.13.0
github.com/tidwall/gjson v1.14.3
github.com/tidwall/sjson v1.2.5
golang.org/x/sys v0.0.0-20220829200755-d48e67d00261
golang.org/x/sys v0.0.0-20220908164124-27713097b956
golang.org/x/term v0.0.0-20220722155259-a9ba230a4035
gopkg.in/yaml.v3 v3.0.1
)
Expand Down Expand Up @@ -58,7 +58,7 @@ require (
github.com/inconshreveable/mousetrap v1.0.1 // indirect
github.com/itchyny/gojq v0.12.9 // indirect
github.com/itchyny/timefmt-go v0.1.4 // indirect
github.com/jedib0t/go-pretty/v6 v6.3.7 // indirect
github.com/jedib0t/go-pretty/v6 v6.3.8 // indirect
github.com/joho/godotenv v1.4.0 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/logrusorgru/aurora v2.0.3+incompatible // indirect
Expand All @@ -67,7 +67,7 @@ require (
github.com/manifoldco/promptui v0.9.0 // indirect
github.com/mattn/go-localereader v0.0.1 // indirect
github.com/mattn/go-runewidth v0.0.13 // indirect
github.com/microcosm-cc/bluemonday v1.0.19 // indirect
github.com/microcosm-cc/bluemonday v1.0.20 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/muesli/ansi v0.0.0-20211031195517-c9f0611b6c70 // indirect
github.com/muesli/cancelreader v0.2.2 // indirect
Expand All @@ -77,7 +77,7 @@ require (
github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/tview v0.0.0-20220812085834-0e6b21a48e96 // indirect
github.com/rivo/tview v0.0.0-20220906194528-4664d8bf22d9 // indirect
github.com/rivo/uniseg v0.3.4 // indirect
github.com/sahilm/fuzzy v0.1.0 // indirect
github.com/scmn-dev/browser v0.1.3 // indirect
Expand All @@ -95,7 +95,7 @@ require (
github.com/yosssi/gohtml v0.0.0-20201013000340-ee4748c638f4 // indirect
github.com/yuin/goldmark v1.4.14 // indirect
github.com/yuin/goldmark-emoji v1.0.1 // indirect
golang.org/x/net v0.0.0-20220826154423-83b083e8dc8b // indirect
golang.org/x/net v0.0.0-20220907135653-1e95f45603a7 // indirect
golang.org/x/text v0.3.7 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
Expand Down
196 changes: 14 additions & 182 deletions go.sum

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion internal/railway/db-add.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"time"

"github.com/abdfnx/botway/constants"
"github.com/botwayorg/railway-api/entity"
"github.com/briandowns/spinner"
"github.com/railwayapp/cli/entity"
)

func avaliableDBs() {
Expand Down
2 changes: 1 addition & 1 deletion internal/railway/db-connect.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"os/exec"

"github.com/abdfnx/botway/constants"
"github.com/railwayapp/cli/entity"
"github.com/botwayorg/railway-api/entity"
)

func (h *Handler) Connect(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
6 changes: 3 additions & 3 deletions internal/railway/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import (

"github.com/abdfnx/botway/constants"
"github.com/abdfnx/botway/internal/railway/project"
"github.com/railwayapp/cli/entity"
"github.com/railwayapp/cli/ui"
"github.com/railwayapp/cli/uuid"
"github.com/botwayorg/railway-api/entity"
"github.com/botwayorg/railway-api/ui"
"github.com/botwayorg/railway-api/uuid"
)

func (h *Handler) Delete(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/railway/deploy-down.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (

"github.com/abdfnx/botway/constants"
deleteProject "github.com/abdfnx/botway/internal/railway/delete"
"github.com/railwayapp/cli/entity"
"github.com/botwayorg/railway-api/entity"
)

func (h *Handler) Down(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/railway/deploy-live.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package railway
import (
"context"

"github.com/railwayapp/cli/entity"
"github.com/botwayorg/railway-api/entity"
)

func (h *Handler) OpenApp(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
6 changes: 3 additions & 3 deletions internal/railway/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ import (

"github.com/abdfnx/botway/constants"
"github.com/abdfnx/botway/tools"
"github.com/botwayorg/railway-api/entity"
CLIErrors "github.com/botwayorg/railway-api/errors"
"github.com/botwayorg/railway-api/ui"
"github.com/briandowns/spinner"
"github.com/railwayapp/cli/entity"
CLIErrors "github.com/railwayapp/cli/errors"
"github.com/railwayapp/cli/ui"
)

func (h *Handler) Delpoy(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
6 changes: 3 additions & 3 deletions internal/railway/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
"syscall"

"github.com/abdfnx/botway/constants"
"github.com/railwayapp/cli/entity"
"github.com/railwayapp/cli/errors"
"github.com/railwayapp/cli/ui"
"github.com/botwayorg/railway-api/entity"
"github.com/botwayorg/railway-api/errors"
"github.com/botwayorg/railway-api/ui"
)

func (h *Handler) getEnvironment(ctx context.Context, environmentName string) (*entity.Environment, error) {
Expand Down
4 changes: 2 additions & 2 deletions internal/railway/handler.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package railway

import (
"github.com/railwayapp/cli/configs"
"github.com/railwayapp/cli/controller"
"github.com/botwayorg/railway-api/configs"
"github.com/botwayorg/railway-api/controller"
)

type Handler struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/railway/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"

"github.com/abdfnx/botway/constants"
"github.com/railwayapp/cli/entity"
"github.com/railwayapp/cli/errors"
"github.com/botwayorg/railway-api/entity"
"github.com/botwayorg/railway-api/errors"
)

func (h *Handler) Info(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
4 changes: 2 additions & 2 deletions internal/railway/init-rw-project.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import (
"os"

"github.com/abdfnx/botway/constants"
"github.com/railwayapp/cli/entity"
"github.com/railwayapp/cli/ui"
"github.com/botwayorg/railway-api/entity"
"github.com/botwayorg/railway-api/ui"
)

func (h *Handler) initNew(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
4 changes: 2 additions & 2 deletions internal/railway/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"errors"

"github.com/abdfnx/botway/internal/railway/project"
"github.com/railwayapp/cli/entity"
"github.com/railwayapp/cli/uuid"
"github.com/botwayorg/railway-api/entity"
"github.com/botwayorg/railway-api/uuid"
)

func (h *Handler) Link(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/railway/login.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/abdfnx/botway/constants"
"github.com/railwayapp/cli/entity"
"github.com/botwayorg/railway-api/entity"
)

func (h *Handler) Login(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/railway/logout.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package railway
import (
"context"

"github.com/railwayapp/cli/entity"
"github.com/botwayorg/railway-api/entity"
)

func (h *Handler) Logout(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/railway/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package railway
import (
"context"

"github.com/railwayapp/cli/entity"
"github.com/botwayorg/railway-api/entity"
)

func (h *Handler) Logs(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
4 changes: 2 additions & 2 deletions internal/railway/panic.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"strings"

"github.com/railwayapp/cli/errors"
"github.com/railwayapp/cli/ui"
"github.com/botwayorg/railway-api/errors"
"github.com/botwayorg/railway-api/ui"
)

func (h *Handler) Panic(ctx context.Context, panicErr string, stacktrace string, cmd string, args []string) error {
Expand Down
2 changes: 1 addition & 1 deletion internal/railway/unlink.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"fmt"

"github.com/abdfnx/botway/constants"
"github.com/railwayapp/cli/entity"
"github.com/botwayorg/railway-api/entity"
)

func (h *Handler) Unlink(ctx context.Context, req *entity.CommandRequest) error {
Expand Down
Loading

0 comments on commit 91bb7b3

Please sign in to comment.