mirror of
https://github.com/shiroyashik/sculptor.git
synced 2025-12-06 04:51:13 +03:00
A cup of Docker
This commit is contained in:
parent
2b5258d551
commit
13702a94c0
2 changed files with 38 additions and 0 deletions
21
Dockerfile
Normal file
21
Dockerfile
Normal file
|
|
@ -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"]
|
||||
17
docker-compose.yml
Normal file
17
docker-compose.yml
Normal file
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue