-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
86 lines (80 loc) · 2.22 KB
/
docker-compose.dev.yml
File metadata and controls
86 lines (80 loc) · 2.22 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
# Notifier Service - Development Docker Compose
# Usage: docker compose -f docker-compose.dev.yml up -d
# Note: This only starts infrastructure services, not the app (use go run or air for hot reload)
services:
notifier-postgres:
image: postgres:16-alpine
container_name: ${COMPOSE_PROJECT_NAME:-notifier}-postgres
env_file:
- .env
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-notifier_db}
ports:
- "${POSTGRES_PORT:-5434}:5432"
volumes:
- notifier-postgres-data:/var/lib/postgresql/data
- ./scripts/init-db.sql:/docker-entrypoint-initdb.d/init.sql:ro
# networks:
# - notifier-dev-network
restart: unless-stopped
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-notifier_db}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
notifier-redis:
image: redis:7-alpine
container_name: ${COMPOSE_PROJECT_NAME:-notifier}-redis
command: >
redis-server
--appendonly yes
--maxmemory 256mb
--maxmemory-policy allkeys-lru
ports:
- "${REDIS_PORT:-6381}:6379"
volumes:
- notifier-redis-data:/data
# networks:
# - notifier-dev-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
# Optional: MailHog for email testing
mailhog:
image: mailhog/mailhog:latest
container_name: ${COMPOSE_PROJECT_NAME:-notifier}-mailhog
ports:
- "1025:1025" # SMTP
- "8025:8025" # Web UI
# networks:
# - notifier-dev-network
profiles:
- tools
# Optional: Adminer for database management
adminer:
image: adminer:latest
container_name: ${COMPOSE_PROJECT_NAME:-notifier}-adminer
ports:
- "8083:8080"
# networks:
# - notifier-dev-network
depends_on:
- notifier-postgres
profiles:
- tools
volumes:
notifier-postgres-data:
driver: local
notifier-redis-data:
driver: local
# networks:
# notifier-dev-network:
# driver: bridge
# name: minisource-dev