-
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.
- Loading branch information
Showing
3 changed files
with
71 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,18 @@ | ||
# flyctl launch added from .gitignore | ||
# Generated by Cargo | ||
# will have compiled files and executables | ||
target | ||
**/pkg | ||
|
||
# These are backup files generated by rustfmt | ||
**/**/*.rs.bk | ||
|
||
# node e2e test tools and outputs | ||
**/node_modules | ||
**/test-results | ||
**/end2end/playwright-report | ||
**/playwright/.cache | ||
|
||
# flyctl launch added from node_modules/.pnpm/[email protected]/node_modules/tailwindcss/stubs/.gitignore | ||
!node_modules/.pnpm/[email protected]/node_modules/tailwindcss/stubs/**/* | ||
fly.toml |
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,31 @@ | ||
# Get started with a build env with Rust nightly | ||
FROM rustlang/rust:nightly-alpine as builder | ||
|
||
RUN apk update && \ | ||
apk add --no-cache bash curl npm libc-dev binaryen | ||
|
||
RUN npm install -g tailwind | ||
|
||
RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/leptos-rs/cargo-leptos/releases/latest/download/cargo-leptos-installer.sh | sh | ||
|
||
# Add the WASM target | ||
RUN rustup target add wasm32-unknown-unknown | ||
|
||
WORKDIR /work | ||
COPY . . | ||
|
||
RUN cargo leptos build --release -vv | ||
|
||
FROM rustlang/rust:nightly-alpine as runner | ||
|
||
WORKDIR /app | ||
|
||
COPY --from=builder /work/target/release/hls-test /app/ | ||
COPY --from=builder /work/target/site /app/site | ||
COPY --from=builder /work/Cargo.toml /app/ | ||
|
||
EXPOSE $PORT | ||
ENV LEPTOS_SITE_ROOT=./site | ||
ENV LEPTOS_SITE_ADDR="0.0.0.0:3000" | ||
|
||
CMD ["/app/hls-test"] |
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,22 @@ | ||
# fly.toml app configuration file generated for hls-test-rupansh on 2024-05-15T21:58:55+05:30 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = 'hls-test-rupansh' | ||
primary_region = 'sin' | ||
|
||
[build] | ||
|
||
[http_service] | ||
internal_port = 3000 | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 0 | ||
processes = ['app'] | ||
|
||
[[vm]] | ||
memory = '512mb' | ||
cpu_kind = 'shared' | ||
cpus = 1 |