Restructure Docker for Dokploy deployment
- Copy app code into PHP image, sync to shared volume at startup - Use named volume (app_code) shared between app and nginx - Build nginx image with embedded config (no bind mounts) - Add .dockerignore to optimize image build - Build context moved to project root for both services
This commit is contained in:
@@ -6,7 +6,17 @@ echo " TerManager2 - Entrypoint"
|
||||
echo "========================================="
|
||||
|
||||
# -----------------------------------------------
|
||||
# 0. Create required directories
|
||||
# 0. Sync application code from image to volume
|
||||
# -----------------------------------------------
|
||||
if [ ! -f /var/www/html/artisan ]; then
|
||||
echo "[*] Syncing application code to volume..."
|
||||
cp -a /app-src/. /var/www/html/
|
||||
else
|
||||
echo "[✓] Application code already in volume."
|
||||
fi
|
||||
|
||||
# -----------------------------------------------
|
||||
# 0b. Create required directories
|
||||
# -----------------------------------------------
|
||||
mkdir -p storage/framework/{cache,sessions,views}
|
||||
mkdir -p storage/logs
|
||||
|
||||
Reference in New Issue
Block a user