Skip to content

Commit 2534c13

Browse files
authored
Merge pull request #279 from nanotaboada/feature/compose
chore(container): rename Docker Compose file to preferred canonical form
2 parents 008468d + be91d72 commit 2534c13

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

Dockerfile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,15 @@ COPY --chmod=555 assets/ ./assets/
5757
COPY --chmod=555 scripts/entrypoint.sh ./entrypoint.sh
5858
COPY --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
6466
RUN 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

docker-compose.yml renamed to compose.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ services:
1515

1616
volumes:
1717
storage:
18+
name: ts-node-samples-express-restful_storage

scripts/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set -e
33

44
echo "✔ Executing entrypoint script..."
55

6-
IMAGE_STORAGE_PATH="/app/docker-compose/players-sqlite3.db"
6+
IMAGE_STORAGE_PATH="/app/hold/players-sqlite3.db"
77
VOLUME_STORAGE_PATH="/storage/players-sqlite3.db"
88

99
echo "✔ Starting container..."

scripts/healthcheck.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/bin/sh
22
set -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

0 commit comments

Comments
 (0)