-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
118 lines (102 loc) · 2.46 KB
/
docker-compose.yml
File metadata and controls
118 lines (102 loc) · 2.46 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
version: "3.9"
services:
# =============================================
# ALYA BOT - PRODUCTION
# =============================================
alya-bot:
build:
context: .
dockerfile: Dockerfile
image: alya-bot:${TAG:-latest}
container_name: alya-bot-prod
restart: unless-stopped
env_file:
- .env
environment:
- NODE_ENV=production
- LOG_LEVEL=INFO
- PYTHONUNBUFFERED=1
# Volume mounts
volumes:
- alya-data:/app/data
- alya-logs:/app/logs
- /etc/localtime:/etc/localtime:ro
# Resource limits
deploy:
resources:
limits:
memory: 2G
cpus: '1.0'
reservations:
memory: 512M
cpus: '0.25'
# Health check
healthcheck:
test: ["CMD", "python", "-c", "print('Bot is healthy')"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Networking
networks:
- alya-network
# Security
security_opt:
- no-new-privileges:true
read_only: false
tmpfs:
- /tmp:noexec,nosuid,size=100m
# =============================================
# ALYA BOT - DEVELOPMENT
# =============================================
alya-bot-dev:
build:
context: .
dockerfile: Dockerfile
image: alya-bot:${DEV_TAG:-dev}
container_name: alya-bot-dev
restart: unless-stopped
# Environment untuk development
env_file:
- .env
environment:
- NODE_ENV=development
- LOG_LEVEL=DEBUG
- PYTHONUNBUFFERED=1
# Volume mounts dengan live code reload
volumes:
- .:/app:rw
- alya-data:/app/data
- alya-logs:/app/logs
- /etc/localtime:/etc/localtime:ro
# Development command
command: ["python", "-u", "main.py"]
# Resource limits (lebih kecil untuk dev)
deploy:
resources:
limits:
memory: 1G
cpus: '0.5'
# Networking
networks:
- alya-network
# Profile untuk development
profiles:
- dev
# =============================================
# NETWORKS
# =============================================
networks:
alya-network:
driver: bridge
name: alya-bot-network
# =============================================
# VOLUMES
# =============================================
volumes:
alya-data:
driver: local
name: alya-bot-data
alya-logs:
driver: local
name: alya-bot-logs