chore: updated docker info
d41a8766
4 file(s) · +34 −12
| 1 | + | target/ |
|
| 2 | + | .git/ |
|
| 3 | + | .github/ |
|
| 4 | + | *.png |
|
| 5 | + | *.gif |
| 1 | + | FROM rust:1-slim-bookworm AS builder |
|
| 2 | + | WORKDIR /app |
|
| 3 | + | COPY . . |
|
| 4 | + | RUN cargo build --release |
|
| 5 | + | ||
| 6 | + | FROM debian:bookworm-slim |
|
| 7 | + | COPY --from=builder /app/target/release/sipp /usr/local/bin/sipp |
|
| 8 | + | WORKDIR /data |
|
| 9 | + | EXPOSE 3000 |
|
| 10 | + | CMD ["sipp", "server", "--port", "3000", "--host", "0.0.0.0"] |
| 157 | 157 | ||
| 158 | 158 | ### Docker |
|
| 159 | 159 | ||
| 160 | - | ```dockerfile |
|
| 161 | - | FROM rust:1-slim AS builder |
|
| 162 | - | WORKDIR /app |
|
| 163 | - | COPY . . |
|
| 164 | - | RUN cargo build --release |
|
| 160 | + | A `Dockerfile` and `docker-compose.yml` are included in the repository. |
|
| 165 | 161 | ||
| 166 | - | FROM debian:bookworm-slim |
|
| 167 | - | COPY --from=builder /app/target/release/sipp /usr/local/bin/sipp |
|
| 168 | - | WORKDIR /data |
|
| 169 | - | EXPOSE 3000 |
|
| 170 | - | CMD ["sipp", "server", "--port", "3000", "--host", "0.0.0.0"] |
|
| 171 | - | ``` |
|
| 162 | + | ```bash |
|
| 163 | + | # Using Docker Compose (recommended) |
|
| 164 | + | SIPP_API_KEY=your-secret-key docker compose up -d |
|
| 172 | 165 | ||
| 173 | - | ```bash |
|
| 166 | + | # Or build and run manually |
|
| 174 | 167 | docker build -t sipp . |
|
| 175 | 168 | docker run -p 3000:3000 -e SIPP_API_KEY=your-secret-key -v sipp-data:/data sipp |
|
| 176 | 169 | ``` |
| 1 | + | services: |
|
| 2 | + | sipp: |
|
| 3 | + | build: . |
|
| 4 | + | ports: |
|
| 5 | + | - "3000:3000" |
|
| 6 | + | environment: |
|
| 7 | + | - SIPP_API_KEY=${SIPP_API_KEY:-changeme} |
|
| 8 | + | - SIPP_AUTH_ENDPOINTS=api_delete,api_list |
|
| 9 | + | volumes: |
|
| 10 | + | - sipp-data:/data |
|
| 11 | + | restart: unless-stopped |
|
| 12 | + | ||
| 13 | + | volumes: |
|
| 14 | + | sipp-data: |