Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
97 lines (92 loc) · 2.4 KB
/
Copy pathdocker-compose.yml
File metadata and controls
97 lines (92 loc) · 2.4 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
# Docker Compose for CI/CD Development Environment
version: '3.8'
services:
# Main CI/CD Environment
ci-environment:
build:
context: .
dockerfile: Dockerfile.ci
target: final
image: observability-platform-ci:latest
container_name: obs-ci-env
volumes:
# Mount project source code
- .:/workspace
# Persistent cache directories
- ci-cache:/workspace/.cache
- ci-reports:/workspace/.reports
# Docker socket for container scanning (optional)
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
# CI Configuration
- CI=true
- DOCKER_BUILDKIT=1
- COMPOSE_DOCKER_CLI_BUILD=1
# Tool configurations
- YAMLLINT_CONFIG_FILE=/workspace/ci/lint/.yamllint.yml
- MARKDOWNLINT_CONFIG=/workspace/ci/lint/.markdownlint.json
# Security scanning
- TRIVY_CACHE_DIR=/workspace/.cache/trivy
- CHECKOV_LOG_LEVEL=WARNING
working_dir: /workspace
networks:
- ci-network
# Keep container running for development
stdin_open: true
tty: true
# Lightweight CI Runner (for CI/CD pipelines)
ci-runner:
build:
context: .
dockerfile: Dockerfile.ci
target: ci-environment
image: observability-platform-ci:runner
volumes:
- .:/workspace:ro # Read-only for CI
- ci-reports:/workspace/.reports
environment:
- CI=true
- CI_RUNNER=true
working_dir: /workspace
networks:
- ci-network
# Run CI pipeline and exit
command: ["make", "ci"]
# Development Environment with additional tools
dev-environment:
build:
context: .
dockerfile: Dockerfile.ci
target: dev-environment
image: observability-platform-ci:dev
container_name: obs-dev-env
volumes:
- .:/workspace
- dev-cache:/root/.cache
- dev-config:/root/.config
environment:
- DEVELOPMENT=true
ports:
# Expose common development ports
- "3000:3000" # General development
- "8080:8080" # HTTP services
- "9090:9090" # Prometheus/monitoring
- "8888:8888" # Jupyter Lab
working_dir: /workspace
networks:
- ci-network
stdin_open: true
tty: true
volumes:
# Persistent volumes for caching
ci-cache:
driver: local
ci-reports:
driver: local
dev-cache:
driver: local
dev-config:
driver: local
networks:
ci-network:
driver: bridge