Skip to content

Commit d5d0fdd

Browse files
committed
feat: aggregate api and ssh services into one
1 parent 1efe62c commit d5d0fdd

File tree

425 files changed

+1357
-1472
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

425 files changed

+1357
-1472
lines changed

.github/workflows/docker-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
fail-fast: false
2020
matrix:
21-
project: [api, ssh, gateway, ui, cli]
21+
project: [server, gateway, ui, cli]
2222

2323
runs-on: ubuntu-24.04
2424

.github/workflows/docker-publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
strategy:
1313
fail-fast: true
1414
matrix:
15-
project: [api, ssh, gateway, ui, cli]
15+
project: [server, gateway, ui, cli]
1616

1717
runs-on: ubuntu-24.04
1818

.github/workflows/qa.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
strategy:
1717
fail-fast: false
1818
matrix:
19-
project: [api, agent, pkg, ssh, ui, cli]
19+
project: [server, agent, pkg, ui, cli]
2020
include:
21-
- project: api
21+
- project: server
2222
extra_args: ""
2323
lint_args: ""
2424
- project: agent
@@ -27,9 +27,6 @@ jobs:
2727
- project: pkg
2828
extra_args: ""
2929
lint_args: ""
30-
- project: ssh
31-
extra_args: "-tags internal_api"
32-
lint_args: "--build-tags internal_api"
3330
- project: ui
3431
extra_args: ""
3532
lint_args: ""

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ agent/shellhub.key
2525

2626
# Directory used by devscripts/run-agent to store binaries
2727
bin/agent
28+
29+
tmp/

agent/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# base stage
2-
FROM golang:1.23-alpine3.19 AS base
2+
FROM golang:1.23.7-alpine3.21 AS base
33

44
ARG GOPROXY
55

@@ -44,7 +44,7 @@ ENV GOPROXY ${GOPROXY}
4444
RUN apk add --update openssl openssh-client
4545
RUN go install github.com/air-verse/[email protected] && \
4646
go install github.com/go-delve/delve/cmd/[email protected] && \
47-
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
47+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.2
4848

4949
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub
5050

agent/Dockerfile.amd64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine3.19 AS base
1+
FROM golang:1.23.7-alpine3.21 AS base
22

33
ARG SHELLHUB_VERSION=latest
44

agent/Dockerfile.arm32v6

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
22

3-
FROM arm32v6/golang:1.23-alpine3.19
3+
FROM arm32v6/golang:1.23.7-alpine3.21
44

55
ARG SHELLHUB_VERSION=latest
66

agent/Dockerfile.arm32v7

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
22

3-
FROM arm32v7/golang:1.23-alpine3.19
3+
FROM arm32v7/golang:1.23.7-alpine3.21
44

55
ARG SHELLHUB_VERSION=latest
66

agent/Dockerfile.arm64v8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
22

3-
FROM arm64v8/golang:1.23-alpine3.19
3+
FROM arm64v8/golang:1.23.7-alpine3.21
44

55
ARG SHELLHUB_VERSION=latest
66

agent/Dockerfile.i386

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine3.19
1+
FROM golang:1.23.7-alpine3.21
22

33
ARG SHELLHUB_VERSION=latest
44

agent/Dockerfile.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.23-alpine3.19
1+
FROM golang:1.23.7-alpine3.21
22

33
ARG GOPROXY
44

api/.air.toml

Lines changed: 0 additions & 34 deletions
This file was deleted.

api/README.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

api/entrypoint-dev.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

api/main.go

Lines changed: 0 additions & 68 deletions
This file was deleted.

api/refresh.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

cli/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# base stage
2-
FROM golang:1.23-alpine3.19 AS base
2+
FROM golang:1.23.7-alpine3.21 AS base
33

44
RUN apk add --no-cache git ca-certificates
55

66
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub
77

88
COPY ./go.mod ./
9-
COPY ./api/go.mod ./api/go.mod
9+
COPY ./server/go.mod ./server/go.mod
1010

1111
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub/cli
1212

@@ -17,7 +17,7 @@ RUN go mod download
1717
# builder stage
1818
FROM base AS builder
1919

20-
COPY ./api $GOPATH/src/github.com/shellhub-io/shellhub/api
20+
COPY ./server $GOPATH/src/github.com/shellhub-io/shellhub/server
2121
COPY ./pkg $GOPATH/src/github.com/shellhub-io/shellhub/pkg
2222
COPY ./cli .
2323

@@ -34,7 +34,7 @@ FROM builder AS development
3434

3535
RUN apk add --update openssl build-base docker-cli
3636
RUN go install github.com/cosmtrek/[email protected] && \
37-
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.1.6
37+
go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.63.2
3838

3939
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub
4040

cli/Dockerfile.test

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
# base stage
2-
FROM golang:1.23-alpine3.19 AS base
2+
FROM golang:1.23.7-alpine3.21 AS base
33

44
RUN apk add --no-cache git ca-certificates
55

66
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub
7+
COPY ./go.mod ./go.sum ./
78

8-
COPY ./go.mod ./
9-
COPY ./api/go.mod ./api/go.mod
9+
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub/server
10+
COPY ./server/go.mod ./server/go.sum ./
1011

1112
WORKDIR $GOPATH/src/github.com/shellhub-io/shellhub/cli
12-
1313
COPY ./cli/go.mod ./cli/go.sum ./
1414

1515
RUN go mod download
1616

17-
COPY ./api $GOPATH/src/github.com/shellhub-io/shellhub/api
17+
COPY ./server $GOPATH/src/github.com/shellhub-io/shellhub/server
1818
COPY ./pkg $GOPATH/src/github.com/shellhub-io/shellhub/pkg
1919
COPY ./cli .
2020

0 commit comments

Comments
 (0)