-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·62 lines (57 loc) · 1.17 KB
/
docker-compose.yml
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
version: '3.8'
services:
backend:
build:
context: ./shortomega-backend
dockerfile: Dockerfile
container_name: shortomega-backend
restart: always
ports:
- "3000:3000"
environment:
- NODE_ENV=production
- REDIS_HOST=redis
- REDIS_PORT=6379
depends_on:
- redis
networks:
- app-network
volumes:
- ./backend:/app
- /app/node_modules
frontend:
build:
context: ./shortomega-frontend
dockerfile: Dockerfile
container_name: shortomega-frontend
restart: always
ports:
- "3001:3001"
environment:
- NODE_ENV=production
- NEXT_PUBLIC_API_URL=http://localhost:3001
- NEXT_PUBLIC_SHORT_HOST=http://localhost:3001
depends_on:
- backend
networks:
- app-network
volumes:
- ./frontend:/app
- /app/node_modules
redis:
image: redis:alpine
container_name: redis
restart: always
ports:
- "6379:6379"
volumes:
- redis-data:/data
networks:
- app-network
command: redis-server --appendonly yes
networks:
app-network:
driver: bridge
volumes:
redis-data:
driver: local