-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (70 loc) · 2.04 KB
/
Copy pathdocker-compose.yml
File metadata and controls
73 lines (70 loc) · 2.04 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
# RSS Aggregator Docker Compose Configuration
#
# Usage:
# Full stack (API + Web): docker compose up -d
# API only: docker compose --profile api up -d
# Web only: docker compose --profile web up -d
#
# Environment variables (see .env.example):
# DOCKER_CONTAINER_NAME - Container name prefix (default: rss-aggregator)
# DOCKER_API_PORT - API port (default: 8000)
# DOCKER_WEB_PORT - Web port (default: 8080)
# VITE_API_BASE_URL - API URL for frontend (default: /api/v1)
services:
# ===========================================
# API Service (Backend)
# ===========================================
api:
build:
context: .
dockerfile: Dockerfile.api
container_name: ${DOCKER_CONTAINER_NAME:-rss-aggregator}-api
restart: unless-stopped
ports:
- "${DOCKER_API_PORT:-8000}:8000"
volumes:
- ./data:/app/data
env_file:
- .env
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
profiles:
- api
- full
# ===========================================
# Web Service (Frontend)
# ===========================================
web:
build:
context: .
dockerfile: Dockerfile.web
args:
VITE_API_BASE_URL: ${VITE_API_BASE_URL:-/api/v1}
container_name: ${DOCKER_CONTAINER_NAME:-rss-aggregator}-web
restart: unless-stopped
ports:
- "${DOCKER_WEB_PORT:-8080}:80"
depends_on:
api:
condition: service_healthy
required: false
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s
profiles:
- web
- full
# ===========================================
# Networks
# ===========================================
networks:
default:
name: ${DOCKER_CONTAINER_NAME:-rss-aggregator}-network
enable_ipv6: false