Skip to content

Commit d5658b9

Browse files
committed
use debian trixie as the base image of docker upgrade to mongodb 8.0
1 parent 42783a3 commit d5658b9

2 files changed

Lines changed: 36 additions & 19 deletions

File tree

docker-compose.yml

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,47 @@
11
services:
2-
app:
3-
image: mominul/packhub@sha256:a92a7ec201d3f5005c39772dc4fcb440cd0f049f8ab279cae718ae0e9b29a138
4-
container_name: packhub_app
5-
depends_on:
6-
- mongodb
7-
ports:
8-
- "80:80"
9-
- "443:443"
10-
volumes:
11-
- ./.env:/app/.env
12-
- ./key.gpg:/app/key.gpg
13-
- ${PACKHUB_DOCKER_CERT_PEM}:/app/fullchain.pem
14-
- ${PACKHUB_DOCKER_KEY_PEM}:/app/privkey.pem
15-
162
mongodb:
17-
image: mongo:5.0.6
3+
image: mongo:8.0
184
container_name: packhub_mongodb
19-
restart: always
5+
restart: unless-stopped
206
ports:
217
- "27017:27017"
228
environment:
239
MONGO_INITDB_ROOT_USERNAME: ${PACKHUB_DB_USER}
2410
MONGO_INITDB_ROOT_PASSWORD: ${PACKHUB_DB_PASSWORD}
2511
volumes:
2612
- mongodb_data:/data/db
13+
healthcheck:
14+
test:
15+
[
16+
"CMD",
17+
"mongosh",
18+
"--username",
19+
"${PACKHUB_DB_USER}",
20+
"--password",
21+
"${PACKHUB_DB_PASSWORD}",
22+
"--eval",
23+
"db.adminCommand('ping')",
24+
]
25+
interval: 10s
26+
timeout: 5s
27+
retries: 5
28+
start_period: 15s
29+
30+
app:
31+
image: mominul/packhub
32+
container_name: packhub_app
33+
restart: unless-stopped
34+
depends_on:
35+
mongodb:
36+
condition: service_healthy
37+
ports:
38+
- "80:80"
39+
- "443:443"
40+
volumes:
41+
- ./.env:/app/.env
42+
- ./key.gpg:/app/key.gpg
43+
- ./${PACKHUB_DOCKER_CERT_PEM}:/app/fullchain.pem
44+
- ./${PACKHUB_DOCKER_KEY_PEM}:/app/privkey.pem
2745

2846
volumes:
2947
mongodb_data:

images/server.Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Stage 1: Compute the recipe file
2-
FROM rust:latest AS chef
2+
FROM lukemathwalker/cargo-chef:latest-rust-1.90.0-trixie AS chef
33
WORKDIR /app
4-
RUN cargo install cargo-chef
54

65
FROM chef AS planner
76
COPY . .
@@ -20,7 +19,7 @@ COPY . .
2019
RUN cargo build --release
2120

2221
# Stage 3: Minimal final runtime image
23-
FROM debian:bookworm-slim AS runtime
22+
FROM debian:trixie-slim AS runtime
2423

2524
RUN apt update && apt install -y libssl-dev ca-certificates clang llvm pkg-config nettle-dev
2625
RUN update-ca-certificates

0 commit comments

Comments
 (0)