diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..abebd2a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM rust:1.78.0-alpine3.20 as builder + +WORKDIR /build + +RUN apk add musl-dev libressl-dev + +COPY Cargo.toml Cargo.lock ./ +COPY src src + +RUN cargo build --release + +FROM alpine:3.20.0 + +WORKDIR /app + +COPY --from=builder /build/target/release/sculptor /app/sculptor + +VOLUME [ "/app/avatars" ] +EXPOSE 6665/tcp + +CMD ["./sculptor"] \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..147ad3f --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,17 @@ +name: sculptor + +services: + sculptor: + build: . + container_name: sculptor + restart: unless-stopped + volumes: + - ./Config.toml:/app/Config.toml:ro + - ./avatars:/app/avatars + ## Recommended for use with reverse proxy. + # labels: + # - traefik.enable=true + # - traefik.http.routers.sculptor.rule=Host(`mc.example.com`) + # - traefik.http.routers.sculptor.entrypoints=websecure, web + # - traefik.http.routers.sculptor.tls=true + # - traefik.http.routers.sculptor.tls.certresolver=production