forked from geturbackend/urBackend
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
43 lines (39 loc) · 1.4 KB
/
docker-compose.yml
File metadata and controls
43 lines (39 loc) · 1.4 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
services:
# ── MongoDB ───────────────────────────────────────────────────────────────────
mongo:
image: mongo:7
container_name: urbackend_mongo
restart: unless-stopped
volumes:
- mongo_data:/data/db
# ── Redis ─────────────────────────────────────────────────────────────────────
redis:
image: redis:latest
container_name: urbackend_redis
restart: unless-stopped
volumes:
- redis_data:/data
# ── Backend (Node.js) ─────────────────────────────────────────────────────────
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: urbackend_api
restart: unless-stopped
ports:
- '1234:1234'
depends_on:
- mongo
- redis
env_file:
- path: .env
required: false
environment:
# Override DB URLs to use Docker service names
MONGO_URL: mongodb://mongo:27017/urbackend
REDIS_URL: redis://redis:6379
NODE_ENV: production
PORT: 1234
volumes:
mongo_data:
redis_data: