chore: update Docker configurations to streamline backend build and enhance E2E testing environment

This commit is contained in:
Anish Sarkar 2026-05-11 12:31:15 +05:30
parent efff7ab2a2
commit 242925d8e5
4 changed files with 18 additions and 4 deletions

View file

@ -10,6 +10,11 @@
name: surfsense-dev
x-backend-build: &backend-build
context: ../surfsense_backend
args:
EMBEDDING_MODEL: ${EMBEDDING_MODEL:-sentence-transformers/all-MiniLM-L6-v2}
services:
db:
image: pgvector/pgvector:pg17
@ -69,7 +74,7 @@ services:
retries: 5
backend:
build: ../surfsense_backend
build: *backend-build
ports:
- "${BACKEND_PORT:-8000}:8000"
volumes:
@ -114,7 +119,7 @@ services:
start_period: 200s
celery_worker:
build: ../surfsense_backend
build: *backend-build
volumes:
- ../surfsense_backend/app:/app/app
- shared_temp:/shared_tmp
@ -140,7 +145,7 @@ services:
condition: service_healthy
celery_beat:
build: ../surfsense_backend
build: *backend-build
env_file:
- ../surfsense_backend/.env
environment:

View file

@ -54,6 +54,8 @@ x-backend-env: &backend-env
HTTPS_PROXY: http://127.0.0.1:1
HTTP_PROXY: http://127.0.0.1:1
NO_PROXY: localhost,127.0.0.1,0.0.0.0,db,redis,host.docker.internal
HF_HUB_OFFLINE: "1"
TRANSFORMERS_OFFLINE: "1"
services:
db:
@ -95,6 +97,8 @@ services:
# tests/ is excluded from the main context by .dockerignore;
# the e2e stage's `COPY --from=tests-source` pulls it in here.
tests-source: ../surfsense_backend/tests
args:
EMBEDDING_MODEL: sentence-transformers/all-MiniLM-L6-v2
cache_from:
- type=gha,scope=surfsense-e2e-backend
cache_to: