-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpodman-compose.dev.yml
More file actions
144 lines (137 loc) · 4.6 KB
/
podman-compose.dev.yml
File metadata and controls
144 lines (137 loc) · 4.6 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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# OpenWatch - Development Podman Compose (Simplified Security for Dev/Testing)
version: '3.8'
services:
database:
image: docker.io/library/postgres:15-alpine
container_name: openwatch-db
environment:
POSTGRES_DB: openwatch
POSTGRES_USER: openwatch
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-openwatch_dev_password}
POSTGRES_INITDB_ARGS: "--auth-host=scram-sha-256 --auth-local=scram-sha-256"
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- openwatch-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U openwatch -d openwatch"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
redis:
image: docker.io/library/redis:7-alpine
container_name: openwatch-redis
command: redis-server --requirepass ${REDIS_PASSWORD:-redis_dev_password} --maxmemory 256mb --maxmemory-policy allkeys-lru
volumes:
- redis_data:/data
networks:
- openwatch-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 30s
backend:
build:
context: .
dockerfile: docker/Containerfile.backend
container_name: openwatch-backend
environment:
DATABASE_URL: postgresql://openwatch:${POSTGRES_PASSWORD:-openwatch_dev_password}@database:5432/openwatch
SECRET_KEY: ${SECRET_KEY:-dev_secret_key_32_chars_minimum_length}
MASTER_KEY: ${MASTER_KEY:-dev_master_key_32_chars_minimum_length}
SCAP_CONTENT_DIR: ${SCAP_CONTENT_DIR:-/app/data/scap}
SCAN_RESULTS_DIR: ${SCAN_RESULTS_DIR:-/app/data/results}
OPENWATCH_DATABASE_URL: postgresql://openwatch:${POSTGRES_PASSWORD:-openwatch_dev_password}@database:5432/openwatch
OPENWATCH_REDIS_URL: redis://:${REDIS_PASSWORD:-redis_dev_password}@redis:6379
OPENWATCH_SECRET_KEY: ${SECRET_KEY:-dev_secret_key_32_chars_minimum_length}
OPENWATCH_MASTER_KEY: ${MASTER_KEY:-dev_master_key_32_chars_minimum_length}
OPENWATCH_FIPS_MODE: "false"
OPENWATCH_REQUIRE_HTTPS: "false"
OPENWATCH_DEBUG: "true"
OPENWATCH_DEMO_MODE: "false"
# Version info for CI/CD (read from VERSION file)
BUILD_DATE: "${BUILD_DATE:-}"
volumes:
- app_data:/app/data
- app_logs:/app/logs
- ./security/certs:/app/security/certs:ro
- ./security/keys:/app/security/keys
ports:
- "8000:8000"
depends_on:
- database
- redis
networks:
- openwatch-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
worker:
build:
context: .
dockerfile: docker/Containerfile.backend
container_name: openwatch-worker
command: ["python3", "-m", "celery", "-A", "app.celery_app", "worker", "--loglevel=info", "--concurrency=2"]
environment:
DATABASE_URL: postgresql://openwatch:${POSTGRES_PASSWORD:-openwatch_dev_password}@database:5432/openwatch
SECRET_KEY: ${SECRET_KEY:-dev_secret_key_32_chars_minimum_length}
MASTER_KEY: ${MASTER_KEY:-dev_master_key_32_chars_minimum_length}
OPENWATCH_DATABASE_URL: postgresql://openwatch:${POSTGRES_PASSWORD:-openwatch_dev_password}@database:5432/openwatch
OPENWATCH_REDIS_URL: redis://:${REDIS_PASSWORD:-redis_dev_password}@redis:6379
OPENWATCH_SECRET_KEY: ${SECRET_KEY:-dev_secret_key_32_chars_minimum_length}
OPENWATCH_MASTER_KEY: ${MASTER_KEY:-dev_master_key_32_chars_minimum_length}
OPENWATCH_FIPS_MODE: "false"
OPENWATCH_DEMO_MODE: "false"
volumes:
- app_data:/app/data
- app_logs:/app/logs
- ./security/certs:/app/security/certs:ro
- ./security/keys:/app/security/keys
depends_on:
- database
- redis
- backend
networks:
- openwatch-network
restart: unless-stopped
frontend:
build:
context: .
dockerfile: docker/Containerfile.frontend
container_name: openwatch-frontend
ports:
- "3001:8080" # Changed to match development port
environment:
REACT_APP_API_URL: http://localhost:8000
depends_on:
- backend
networks:
- openwatch-network
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 30s
volumes:
postgres_data:
driver: local
redis_data:
driver: local
app_data:
driver: local
app_logs:
driver: local
networks:
openwatch-network:
driver: bridge