-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (58 loc) · 1.38 KB
/
docker-compose.yml
File metadata and controls
63 lines (58 loc) · 1.38 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
version: '3.8'
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: scrollsoul-music-sync
restart: unless-stopped
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- PORT=3000
env_file:
- .env
volumes:
- ./logs:/app/logs
networks:
- scrollsoul-network
healthcheck:
test: ["CMD", "node", "-e", "require('http').get('http://localhost:3000/health', (r) => {process.exit(r.statusCode === 200 ? 0 : 1)})"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
# Optional: Add Redis for caching
redis:
image: redis:7-alpine
container_name: scrollsoul-redis
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- scrollsoul-network
command: redis-server --appendonly yes
# Optional: Add PostgreSQL for data persistence
postgres:
image: postgres:15-alpine
container_name: scrollsoul-postgres
restart: unless-stopped
ports:
- "5432:5432"
environment:
- POSTGRES_USER=scrollsoul
- POSTGRES_PASSWORD=scrollsoul_password
- POSTGRES_DB=scrollsoul_music_sync
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- scrollsoul-network
networks:
scrollsoul-network:
driver: bridge
volumes:
redis-data:
postgres-data: