feat: docker hosting

This commit is contained in:
2025-11-17 11:18:27 -05:00
Unverified
parent 8e5bdd373a
commit 02a39a4906
3 changed files with 20 additions and 0 deletions

14
Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM rust:1.91.1 as build
RUN rustup target add x86_64-unknown-linux-musl && \
apt update && \
apt install -y musl-tools musl-dev && \
update-ca-certificates
COPY ./src ./src
COPY ./Cargo.lock .
COPY ./Cargo.toml .
RUN cargo build --target x86_64-unknown-linux-musl --release
ENTRYPOINT ["./target/x86_64-unknown-linux-musl/release/connect4-moderator-server"]

1
docker_build.sh Executable file
View File

@@ -0,0 +1 @@
docker build . -t joshuafhiggins/connect4-moderator-server

5
docker_run.sh Executable file
View File

@@ -0,0 +1,5 @@
docker run -d \
--name=connect4-moderator-server \
--restart unless-stopped \
-p 5101:8080 \
joshuafhiggins/connect4-moderator-server