forked from ekzhang/sshx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement deployment with Fly.io and Docker
- Loading branch information
Showing
4 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM rust:alpine as backend | ||
WORKDIR /home/rust/src | ||
RUN apk --no-cache add musl-dev openssl-dev protoc | ||
RUN rustup component add rustfmt | ||
COPY . . | ||
RUN cargo build --release | ||
|
||
FROM node:lts-alpine as frontend | ||
WORKDIR /usr/src/app | ||
COPY . . | ||
RUN npm ci | ||
RUN npm run build | ||
|
||
FROM alpine:latest | ||
WORKDIR /root | ||
COPY --from=frontend /usr/src/app/build build | ||
COPY --from=backend /home/rust/src/target/release/sshx-server . | ||
CMD ["./sshx-server", "--host"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
app = "sshx" | ||
|
||
kill_signal = "SIGINT" | ||
kill_timeout = 5 | ||
processes = [] | ||
|
||
[experimental] | ||
allowed_public_ports = [] | ||
auto_rollback = true | ||
|
||
[[services]] | ||
internal_port = 8051 | ||
processes = ["app"] | ||
protocol = "tcp" | ||
|
||
[[services.ports]] | ||
handlers = ["tls"] | ||
port = 443 | ||
|
||
[services.ports.tls_options] | ||
alpn = ["h2"] | ||
|
||
[[services.tcp_checks]] | ||
grace_period = "1s" | ||
interval = "15s" | ||
restart_limit = 0 | ||
timeout = "2s" |