File tree Expand file tree Collapse file tree 4 files changed +10
-6
lines changed
Expand file tree Collapse file tree 4 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -57,12 +57,15 @@ COPY --chmod=555 assets/ ./assets/
5757COPY --chmod=555 scripts/entrypoint.sh ./entrypoint.sh
5858COPY --chmod=555 scripts/healthcheck.sh ./healthcheck.sh
5959
60- # Pre-seeded SQLite database as init bundle
61- COPY --chmod=555 storage/ ./docker-compose/
60+ # The 'hold' is our storage compartment within the image. Here, we copy a
61+ # pre-seeded SQLite database file, which Compose will mount as a persistent
62+ # 'storage' volume when the container starts up.
63+ COPY --chmod=555 storage/ ./hold/
6264
6365# Install SQLite runtime libs, add non-root user and prepare volume mount point
6466RUN apk add --no-cache sqlite-libs && \
65- adduser -D -g "" express && \
67+ addgroup -S express && \
68+ adduser -S -G express express && \
6669 mkdir -p /storage && \
6770 chown -R express:express /storage
6871
Original file line number Diff line number Diff line change @@ -15,3 +15,4 @@ services:
1515
1616volumes :
1717 storage :
18+ name : ts-node-samples-express-restful_storage
Original file line number Diff line number Diff line change 33
44echo " ✔ Executing entrypoint script..."
55
6- IMAGE_STORAGE_PATH=" /app/docker-compose /players-sqlite3.db"
6+ IMAGE_STORAGE_PATH=" /app/hold /players-sqlite3.db"
77VOLUME_STORAGE_PATH=" /storage/players-sqlite3.db"
88
99echo " ✔ Starting container..."
Original file line number Diff line number Diff line change 11#! /bin/sh
22set -e
33
4- # Simple health check using curl
5- curl --fail http://localhost:9000/health
4+ # Minimal curl-based health check with timeout and error reporting
5+ curl --fail --silent --show-error --connect-timeout 1 --max-time 2 http://localhost:9000/health
You can’t perform that action at this time.
0 commit comments