-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
35 lines (29 loc) · 1.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
35 lines (29 loc) · 1.13 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
# =============================================================
# docker-compose.yml — DevOps Observability Project
# For local development and testing ONLY
# Production deployment uses GitHub Actions + direct docker run
# =============================================================
services:
devops-observability:
build:
context: ./app
dockerfile: Dockerfile
# Image tag — always points to latest stable version
image: devops-observability:v5
# Container name — replaces random Docker-assigned names
container_name: devops-observability-container
# Port mapping: host:container
ports:
- "8080:80"
# Restart policy — container auto-restarts if it crashes
# unless-stopped = restart always EXCEPT when manually stopped
# This is what keeps the app alive on EC2 after reboots
restart: unless-stopped
# Healthcheck — mirrors what we defined in Dockerfile
# Compose runs this independently to track container health
healthcheck:
test: ["CMD", "wget", "-qO-", "http://localhost/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5s