File tree 4 files changed +60
-0
lines changed
4 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ .gitignore
Original file line number Diff line number Diff line change 49
49
- run : npm run check
50
50
51
51
- run : npm run build
52
+
53
+ deploy :
54
+ name : Deploy
55
+ runs-on : ubuntu-latest
56
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
57
+ needs : [rustfmt, rust, web]
58
+ steps :
59
+ - uses : actions/checkout@v2
60
+
61
+ - uses : superfly/flyctl-actions@master
62
+ env :
63
+ FLY_API_TOKEN : ${{ secrets.FLY_API_TOKEN }}
64
+ with :
65
+ args : " deploy --remote-only"
Original file line number Diff line number Diff line change
1
+ FROM rust:alpine as backend
2
+ WORKDIR /home/rust/src
3
+ RUN apk --no-cache add musl-dev openssl-dev protoc
4
+ RUN rustup component add rustfmt
5
+ COPY . .
6
+ RUN cargo build --release
7
+
8
+ FROM node:lts-alpine as frontend
9
+ WORKDIR /usr/src/app
10
+ COPY . .
11
+ RUN npm ci
12
+ RUN npm run build
13
+
14
+ FROM alpine:latest
15
+ WORKDIR /root
16
+ COPY --from=frontend /usr/src/app/build build
17
+ COPY --from=backend /home/rust/src/target/release/sshx-server .
18
+ CMD ["./sshx-server" , "--host" ]
Original file line number Diff line number Diff line change
1
+ app = " sshx"
2
+
3
+ kill_signal = " SIGINT"
4
+ kill_timeout = 5
5
+ processes = []
6
+
7
+ [experimental ]
8
+ allowed_public_ports = []
9
+ auto_rollback = true
10
+
11
+ [[services ]]
12
+ internal_port = 8051
13
+ processes = [" app" ]
14
+ protocol = " tcp"
15
+
16
+ [[services .ports ]]
17
+ handlers = [" tls" ]
18
+ port = 443
19
+
20
+ [services .ports .tls_options ]
21
+ alpn = [" h2" ]
22
+
23
+ [[services .tcp_checks ]]
24
+ grace_period = " 1s"
25
+ interval = " 15s"
26
+ restart_limit = 0
27
+ timeout = " 2s"
You can’t perform that action at this time.
0 commit comments