Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 34 additions & 16 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,47 @@
services:
app:
image: mominul/packhub:latest
container_name: packhub_app
depends_on:
- mongodb
ports:
- "80:80"
- "443:443"
volumes:
- ./.env:/app/.env
- ./key.gpg:/app/key.gpg
- ${PACKHUB_DOCKER_CERT_PEM}:/app/fullchain.pem
- ${PACKHUB_DOCKER_KEY_PEM}:/app/privkey.pem

mongodb:
image: mongo:5.0.6
image: mongo:8.0
container_name: packhub_mongodb
restart: always
restart: unless-stopped
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ${PACKHUB_DB_USER}
MONGO_INITDB_ROOT_PASSWORD: ${PACKHUB_DB_PASSWORD}
volumes:
- mongodb_data:/data/db
healthcheck:
test:
[
"CMD",
"mongosh",
"--username",
"${PACKHUB_DB_USER}",
"--password",
"${PACKHUB_DB_PASSWORD}",
"--eval",
"db.adminCommand('ping')",
]
interval: 10s
timeout: 5s
retries: 5
start_period: 15s

app:
image: mominul/packhub
container_name: packhub_app
restart: unless-stopped
depends_on:
mongodb:
condition: service_healthy
ports:
- "80:80"
- "443:443"
volumes:
- ./.env:/app/.env
- ./key.gpg:/app/key.gpg
- ./${PACKHUB_DOCKER_CERT_PEM}:/app/fullchain.pem
- ./${PACKHUB_DOCKER_KEY_PEM}:/app/privkey.pem

volumes:
mongodb_data:
4 changes: 2 additions & 2 deletions images/server.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stage 1: Compute the recipe file
FROM lukemathwalker/cargo-chef:latest-rust-latest AS chef
FROM lukemathwalker/cargo-chef:latest-rust-trixie AS chef
WORKDIR /app

FROM chef AS planner
Expand All @@ -19,7 +19,7 @@ COPY . .
RUN cargo build --release

# Stage 3: Minimal final runtime image
FROM debian:bookworm-slim AS runtime
FROM debian:trixie-slim AS runtime

RUN apt update && apt install -y libssl-dev ca-certificates clang llvm pkg-config nettle-dev
RUN update-ca-certificates
Expand Down
Loading