mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
Update aquatic_ws.Dockerfile
This commit is contained in:
parent
375dc1c8e6
commit
d4f9c0b74f
1 changed files with 14 additions and 8 deletions
|
|
@ -1,10 +1,19 @@
|
||||||
# aquatic_ws
|
# aquatic_ws
|
||||||
#
|
#
|
||||||
# If no changes are made to settings, aquatic_ws is run without
|
# WORK IN PROGRESS
|
||||||
# TLS, on port 3000 and with http health checks enabled.
|
|
||||||
#
|
#
|
||||||
|
# Customize by setting CONFIG_FILE_CONTENTS and
|
||||||
|
# ACCESS_LIST_CONTENTS environment variables.
|
||||||
|
#
|
||||||
|
# If no changes are made to configuration, aquatic_ws is run:
|
||||||
|
# - on port 3000
|
||||||
|
# - without TLS
|
||||||
|
# - with no info hash access control
|
||||||
|
# - with http health checks enabled
|
||||||
|
#
|
||||||
|
# Run from root directory of repository with:
|
||||||
# $ docker build -t aquatic-ws -f docker/aquatic_ws.Dockerfile .
|
# $ docker build -t aquatic-ws -f docker/aquatic_ws.Dockerfile .
|
||||||
# $ docker run -it --rm --ulimit memlock=65536:65536 -p 3000:3000 --name aquatic-ws aquatic-ws
|
# $ docker run -it --ulimit memlock=65536:65536 -p 0.0.0.0:3000:3000 --name aquatic-ws aquatic-ws
|
||||||
|
|
||||||
FROM rust:latest AS builder
|
FROM rust:latest AS builder
|
||||||
|
|
||||||
|
|
@ -16,17 +25,14 @@ RUN . ./scripts/env-native-cpu-without-avx-512 && cargo build --release -p aquat
|
||||||
|
|
||||||
FROM debian:stable-slim
|
FROM debian:stable-slim
|
||||||
|
|
||||||
ENV CONFIG_FILE_CONTENTS "log_level = 'trace'\n\n[network]\nenable_http_health_checks = true"
|
ENV CONFIG_FILE_CONTENTS "log_level = 'warn'\n\n[network]\nenable_http_health_checks = true"
|
||||||
ENV ACCESS_LIST_CONTENTS ""
|
ENV ACCESS_LIST_CONTENTS ""
|
||||||
|
|
||||||
WORKDIR /root/
|
WORKDIR /root/
|
||||||
|
|
||||||
COPY --from=builder /usr/src/aquatic/target/release/aquatic_ws ./
|
COPY --from=builder /usr/src/aquatic/target/release/aquatic_ws ./
|
||||||
|
|
||||||
RUN echo "$CONFIG_FILE_CONTENTS" > ./config.toml
|
|
||||||
RUN echo "$ACCESS_LIST_CONTENTS" > ./access-list.txt
|
|
||||||
|
|
||||||
# Enable setting config and access list file contents at runtime
|
# Enable setting config and access list file contents at runtime
|
||||||
RUN echo "#!/bin/sh\necho \"\$CONFIG_FILE_CONTENTS\" > ./config.toml\necho \"\$ACCESS_LIST_CONTENTS\" > ./access-list.txt\n./aquatic_ws -P -c ./config.toml" > entrypoint.sh && chmod +x entrypoint.sh
|
RUN echo "#!/bin/sh\necho \"\$CONFIG_FILE_CONTENTS\" > ./config.toml\necho \"\$ACCESS_LIST_CONTENTS\" > ./access-list.txt\n./aquatic_ws -P -c ./config.toml" > entrypoint.sh && chmod +x entrypoint.sh
|
||||||
|
|
||||||
ENTRYPOINT ["sh", "./entrypoint.sh"]
|
ENTRYPOINT ["./entrypoint.sh"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue