-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
41 lines (39 loc) · 890 Bytes
/
docker-compose.yml
File metadata and controls
41 lines (39 loc) · 890 Bytes
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
version: '3.8'
services:
mongo:
image: mongo:6.0
container_name: social-network-mongo
restart: unless-stopped
volumes:
- mongo-data:/data/db
ports:
- "27017:27017"
backend:
build:
context: ./backend
container_name: social-network-backend
environment:
- MONGO_URI=mongodb://mongo:27017/socialnetwork
- JWT_SECRET=supersecretkey
- JWT_EXPIRES_IN=7d
- PORT=4000
- FRONTEND_URL=http://localhost:5500
ports:
- "4000:4000"
depends_on:
- mongo
volumes:
- ./backend:/usr/src/app
- ./backend/uploads:/usr/src/app/uploads
frontend:
image: nginx:stable-alpine
container_name: social-network-frontend
restart: unless-stopped
ports:
- "5500:80"
volumes:
- ./frontend:/usr/share/nginx/html:ro
depends_on:
- backend
volumes:
mongo-data: