-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (68 loc) · 1.79 KB
/
docker-compose.yml
File metadata and controls
84 lines (68 loc) · 1.79 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
version: '3.8'
services:
crypto-tracker:
image: robertbiv/crypto-tracker:latest
container_name: crypto-transaction-tracker
restart: unless-stopped
# Port mapping
ports:
- "5000:5000"
# Environment variables
environment:
- TZ=UTC
- PYTHONUNBUFFERED=1
# Volume mappings for NAS
volumes:
# Configuration persistence
- ./configs:/app/configs
# Input files
- ./inputs:/app/inputs
# Output files and logs
- ./outputs:/app/outputs
# Processed archive
- ./processed_archive:/app/processed_archive
# SSL certificates (generated on first run)
- ./certs:/app/certs
# Resource limits (adjust based on your NAS)
deploy:
resources:
limits:
cpus: '2.0'
memory: 2G
reservations:
cpus: '0.5'
memory: 512M
# Health check
healthcheck:
test: ["CMD", "curl", "-f", "-k", "https://localhost:5000/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Network mode
network_mode: bridge
# User mapping - set to match your host user ID
# Find your UID with: id -u
# Default 1000 works for most single-user systems
user: "1000:1000"
# Security options
security_opt:
- no-new-privileges:true
# Read-only root filesystem (with exceptions for writable volumes)
# Uncomment if you want extra security
# read_only: true
# tmpfs:
# - /tmp
# Logging
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
# Optional: Separate network for isolation
networks:
default:
driver: bridge
ipam:
config:
- subnet: 172.28.0.0/16