chore: update Docker configuration and entrypoint script

- Enhanced .dockerignore to exclude additional build outputs and dependencies.
- Modified dev.mjs and start.mjs to change Docker container startup behavior, removing the --build flag to preserve volumes.
- Updated docker-compose.yml to add a new volume for persisting Claude CLI OAuth session keys.
- Introduced docker-entrypoint.sh to fix permissions on the Claude CLI config directory.
- Adjusted Dockerfile to include the entrypoint script and ensure proper user permissions.

These changes improve the Docker setup and streamline the development workflow.
This commit is contained in:
webdevcody
2026-01-05 10:44:47 -05:00
parent abab7be367
commit aca84fe16a
8 changed files with 94 additions and 16 deletions

19
docker-entrypoint.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/sh
set -e
# Fix permissions on Claude CLI config directory if it exists
# This handles the case where a volume is mounted and owned by root
if [ -d "/home/automaker/.claude" ]; then
chown -R automaker:automaker /home/automaker/.claude
chmod -R 755 /home/automaker/.claude
fi
# Ensure the directory exists with correct permissions if volume is empty
if [ ! -d "/home/automaker/.claude" ]; then
mkdir -p /home/automaker/.claude
chown automaker:automaker /home/automaker/.claude
chmod 755 /home/automaker/.claude
fi
# Switch to automaker user and execute the command
exec su-exec automaker "$@"