fix: bundle categories into Docker image for Coolify deployment

Coolify remaps volume mounts to its own managed directories, so
./categories was mapped to an empty dir instead of the repo data.

Changes:
- Backend build context changed to repo root (.) so categories/ is accessible
- Dockerfile copies categories into /data/initial-categories/
- startup.sh seeds /data/categories from bundled data if empty
- Removed categories volume mount (reports still persisted via volume)
- Added root .dockerignore (categories NOT excluded)
- Updated CI workflow to match new build context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
furkanyigit34
2026-03-07 23:32:34 +03:00
parent 99a132879f
commit f85fb75830
5 changed files with 64 additions and 15 deletions

View File

@@ -118,7 +118,8 @@ jobs:
- name: Build Backend Docker image
uses: docker/build-push-action@v5
with:
context: ./backend
context: .
file: backend/Dockerfile
push: false
tags: trendyol-backend:test
cache-from: type=gha
@@ -164,7 +165,8 @@ jobs:
backend:
build:
context: ./backend
context: .
dockerfile: backend/Dockerfile
environment:
PYTHONUNBUFFERED: 1
DATABASE_URL: postgresql://postgres:testpassword@postgres:5432/trendyol_db