diff --git a/scripts/start.sh b/scripts/start.sh index 4184fe5..2c936a9 100644 --- a/scripts/start.sh +++ b/scripts/start.sh @@ -20,9 +20,6 @@ docker run --name static \ -e AWS_REGION=${AWS_REGION} \ -e AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} \ -e AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} \ - -e TWILIO_ACCOUNT=${TWILIO_ACCOUNT} \ - -e TWILIO_TOKEN=${TWILIO_TOKEN} \ - -e TWILIO_SENDER=${TWILIO_SENDER} \ -d wafflespeanut/static-server echo 'Launching ace game!' diff --git a/server/Dockerfile b/server/Dockerfile index 9e68fb6..85b1e75 100644 --- a/server/Dockerfile +++ b/server/Dockerfile @@ -1,7 +1,8 @@ FROM rust:alpine -RUN apk add --update musl-dev openssl-dev +RUN apk add --update musl-dev openssl-dev openssl-libs-static g++ COPY . /home/rust/src WORKDIR /home/rust/src +ENV RUSTFLAGS="-C link-args=-Wl,-Bstatic -C link-args=-lc" RUN cargo build --release FROM alpine @@ -10,7 +11,7 @@ RUN apk --update upgrade && \ apk add --update inotify-tools && \ rm -rf /var/cache/apk/* -COPY --from=0 /home/rust/src/target/x86_64-unknown-linux-musl/release/server /server +COPY --from=0 /home/rust/src/target/release/server /server ENV ADDRESS 0.0.0.0:8000 RUN chmod +x /server diff --git a/server/README.md b/server/README.md index b829f7b..ad17300 100644 --- a/server/README.md +++ b/server/README.md @@ -2,6 +2,6 @@ This is my personal server which serves stuff behind an Nginx proxy for [my webs In addition to serving static files, it supports: -- Some caching based on mtime and etags. -- Serving private paths i.e., autogenerates public links for private paths and rotates them over desired intervals. -- Sends SMS (through Twilio or AWS SNS) whenever private paths are accessed (over some configured interval). +- Some caching based on mtime and etags +- Serving private paths (autogenerates public links for private paths and rotates them over intervals) +- Sends SMS (through AWS SNS) whenever private paths are accessed