mirror of
https://github.com/mleem97/gregWiki.git
synced 2026-04-11 03:29:19 +02:00
chore(docker): compose, entrypoint guard, LF shell script; format with Prettier
- Add docker-compose.yml (build context .) and .gitattributes for entrypoint LF - README: document docker compose and gregWiki root requirement - package.json: include docker-compose.yml in npm run format Made-with: Cursor
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
# Prefer wiki subfolder when the repo root is mounted at /app (root also has package.json).
|
||||
# Otherwise use /app when only ./wiki is bound there (compose: ./wiki:/app).
|
||||
if [ -f /app/wiki/package.json ]; then
|
||||
cd /app/wiki
|
||||
elif [ -f /app/package.json ]; then
|
||||
cd /app
|
||||
else
|
||||
echo "docker-entrypoint: no package.json under /app or /app/wiki." >&2
|
||||
echo "Run docker compose from the repository root so ./wiki is mounted, then: docker compose build --no-cache docs" >&2
|
||||
if [ ! -f /app/package.json ]; then
|
||||
echo "docker-entrypoint: ERROR: /app/package.json not found." >&2
|
||||
echo " Build context must be the gregWiki repo root (the folder that contains package.json)." >&2
|
||||
echo " Example: cd path/to/gregWiki && docker build -t gregwiki ." >&2
|
||||
echo " Not: docker build -f gregWiki/Dockerfile .. (wrong context)" >&2
|
||||
echo " Compose: run from gregWiki so build.context is '.' — see docker-compose.yml." >&2
|
||||
echo " If you use a volume on /app, it must map to that repo root, not an empty dir." >&2
|
||||
exit 1
|
||||
fi
|
||||
exec "$@"
|
||||
|
||||
Reference in New Issue
Block a user