-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
60 lines (56 loc) · 1.46 KB
/
docker-compose.yml
File metadata and controls
60 lines (56 loc) · 1.46 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
services:
backend:
build:
context: ./backend
dockerfile: Dockerfile
image: apple-price-backend:latest
container_name: apple-price-backend
restart: unless-stopped
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
environment:
- ENVIRONMENT=production
- PORT=8080
- HOST=0.0.0.0
- SCRAPER_INTERVAL=${SCRAPER_INTERVAL:-5m}
- SCRAPER_USER_AGENT=${SCRAPER_USER_AGENT:-Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36}
- DATA_DIR=/data
- CORS_ORIGINS=${CORS_ORIGINS:-*}
volumes:
- apple-price-data:/data
networks:
- apple-price-network
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
image: apple-price-frontend:latest
container_name: apple-price-frontend
restart: unless-stopped
depends_on:
backend:
condition: service_healthy
networks:
- apple-price-network
nginx:
image: nginx:alpine
container_name: apple-price-nginx
restart: unless-stopped
ports:
- "${PORT:-3003}:80"
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- backend
- frontend
networks:
- apple-price-network
networks:
apple-price-network:
driver: bridge
volumes:
apple-price-data: