File size: 996 Bytes
34d0dc9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d57e0f9
 
34d0dc9
d57e0f9
 
 
 
 
34d0dc9
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
services:
  backend:
    build:
      context: ./Backend
      dockerfile: Dockerfile
    image: scraper-backend:v1  
    ports:
      - "8000:8000"
    volumes:
      - ./Backend/data:/app/data
    env_file:
      - ./Backend/.env
    environment:
      - PORT=8000
      - DB_HOST=host.docker.internal
    extra_hosts:
      - "host.docker.internal:host-gateway"
    restart: unless-stopped

  frontend:
    build:
      context: ./Frontend
      dockerfile: Dockerfile
      target: build           # <--- Important: Stops at the Node stage
    image: scraper-frontend:v1-dev
    ports:
      - "5173:5173"           # <--- Map to Vite's port, not Nginx's port 80
    volumes:
      - ./Frontend:/app       # <--- Syncs your code changes
      - /app/node_modules     # <--- Protects container's installed packages
    command: npm run dev -- --host 0.0.0.0 # <--- Tells Vite to listen for Docker
    depends_on:
      - backend
    restart: unless-stopped