Skip to content

Commit

Permalink
update docker image and increase concurrent connections (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
panekj authored Oct 12, 2024
1 parent fa153d3 commit 80b84d8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ RUN cargo install wasm-pack
WORKDIR /build
COPY . .
RUN --mount=type=cache,target=/usr/local/cargo/registry \
# --mount=type=cache,target=/build/target \
# --mount=type=cache,target=/build/target \
cd ./volts-front && \
wasm-pack build --target web && \
cd .. && \
cargo build --bin volts-server --release

# Runtime image
FROM debian:bullseye
FROM debian:bookworm

RUN apt-get update
RUN apt-get -y install postgresql-client-13
RUN apt install -y postgresql-common
RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -i -v 14
RUN apt-get -y install postgresql-client-14
RUN apt-get -y install nginx
RUN apt-get install ca-certificates -y
RUN update-ca-certificates
Expand All @@ -35,4 +37,4 @@ COPY --from=builder /build/volts-front/pkg/volts_front.js /app/static/main.js
COPY --from=builder /build/volts-front/pkg/volts_front_bg.wasm /app/static/main.wasm
COPY --from=builder /build/target/release/volts-server /app/volts-server

CMD nginx && /app/volts-server
CMD nginx && /app/volts-server
4 changes: 2 additions & 2 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ processes = []
script_checks = []

[services.concurrency]
hard_limit = 25
soft_limit = 20
hard_limit = 100
soft_limit = 25
type = "connections"

[[services.ports]]
Expand Down

0 comments on commit 80b84d8

Please sign in to comment.