-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
82 lines (78 loc) · 2.32 KB
/
Copy pathdocker-compose.dev.yml
File metadata and controls
82 lines (78 loc) · 2.32 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
services:
db:
image: postgres:15-alpine
container_name: allo-scrapper-db-dev
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
POSTGRES_DB: ${POSTGRES_DB:-ics}
volumes:
- postgres_data_dev:/var/lib/postgresql/data
- ./docker/init.sql:/docker-entrypoint-initdb.d/init.sql:ro
ports:
- "${POSTGRES_PORT:-5432}:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
networks:
- allo-network
# Backend server in development mode with hot reload
server:
image: node:20-alpine
container_name: allo-scrapper-server-dev
working_dir: /app
command: sh -c "npm install --legacy-peer-deps && npm run dev --workspace=allo-scrapper-server"
volumes:
- .:/app
- /app/node_modules
- /app/client/node_modules
- /app/server/node_modules
- /app/scraper/node_modules
ports:
- "${SERVER_PORT:-3000}:3000"
environment:
NODE_ENV: development
POSTGRES_HOST: db
POSTGRES_PORT: 5432
POSTGRES_DB: ${POSTGRES_DB:-ics}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is required}
PORT: 3000
TZ: ${TZ:-Europe/Paris}
SCRAPE_CRON_SCHEDULE: ${SCRAPE_CRON_SCHEDULE:-0 8 * * 3}
SCRAPE_DELAY_MS: ${SCRAPE_DELAY_MS:-1000}
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN:-24h}
depends_on:
db:
condition: service_healthy
restart: unless-stopped
networks:
- allo-network
# Frontend in development mode with hot reload
client:
image: node:20-alpine
container_name: allo-scrapper-client-dev
working_dir: /app
command: sh -c "npm install --legacy-peer-deps && npm run dev --workspace=client -- --host"
volumes:
- .:/app
- /app/node_modules
- /app/client/node_modules
- /app/server/node_modules
- /app/scraper/node_modules
ports:
- "${CLIENT_PORT:-5173}:5173"
environment:
VITE_API_BASE_URL: http://localhost:${SERVER_PORT:-3000}/api
restart: unless-stopped
networks:
- allo-network
networks:
allo-network:
driver: bridge
volumes:
postgres_data_dev:
driver: local