diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..b0d53ad --- /dev/null +++ b/.dockerignore @@ -0,0 +1,15 @@ +.git +.gitignore +.venv +venv +.node +__pycache__ +*.pyc +*.pyo +*.pyd +.pytest_cache +db.sqlite3 +frontend/node_modules +frontend/dist +scratch +*.log diff --git a/Dockerfile.backend b/Dockerfile.backend index af73c33..e0d026c 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -21,7 +21,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ # Copy entrypoint script and set executable permissions COPY entrypoint.sh /app/entrypoint.sh -RUN chmod +x /app/entrypoint.sh +RUN sed -i 's/\r$//' /app/entrypoint.sh && chmod +x /app/entrypoint.sh # Copy backend source code COPY backend /app/backend diff --git a/docker-compose.yml b/docker-compose.yml index a0d7615..4fad9f3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -12,7 +12,7 @@ services: volumes: - postgres_data:/var/lib/postgresql/data healthcheck: - test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-divar_crawler}"] + test: [ "CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-divar_crawler}" ] interval: 5s timeout: 5s retries: 5 @@ -23,7 +23,7 @@ services: ports: - "6379:6379" healthcheck: - test: ["CMD", "redis-cli", "ping"] + test: [ "CMD", "redis-cli", "ping" ] interval: 5s timeout: 3s retries: 5 @@ -39,6 +39,7 @@ services: environment: - REDIS_URL=redis://redis:6379/0 - POSTGRES_HOST=db + - CELERY_TASK_ALWAYS_EAGER=False env_file: - .env volumes: @@ -58,6 +59,7 @@ services: environment: - REDIS_URL=redis://redis:6379/0 - POSTGRES_HOST=db + - CELERY_TASK_ALWAYS_EAGER=False env_file: - .env volumes: diff --git a/frontend/vite.config.js b/frontend/vite.config.js index 849acb8..cfc0627 100644 --- a/frontend/vite.config.js +++ b/frontend/vite.config.js @@ -12,7 +12,7 @@ export default defineConfig({ server: { proxy: { '/api': { - target: process.env.VITE_BACKEND_URL || 'http://backend:8000', + target: process.env.VITE_BACKEND_URL || 'http://127.0.0.1:8000', changeOrigin: true, } }