-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
71 lines (65 loc) · 1.44 KB
/
Copy pathdocker-compose.yml
File metadata and controls
71 lines (65 loc) · 1.44 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
version: '3'
services:
mongodb:
image: mongo:latest
restart: always
ports:
- "27017:27017"
volumes:
- mongo-data:/data/db
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: admin
networks:
- chatters
redis:
image: redis:7-alpine
restart: always
ports:
- "6379:6379"
volumes:
- redis-data:/data
command: redis-server --appendonly yes --requirepass redispassword
networks:
- chatters
# production mode
server:
build:
context: ./server
restart: always
ports:
- "8080:8080"
environment:
- PORT=8080
- JWT_KEY={*^*{&(*)^(&*^*&^@()&@!LDHUJDHGYDGUDVH467468TRGF7)}}
- ORIGIN=http://localhost:3000
- DATABASE_URL=mongodb://admin:admin@mongodb:27017/chat-app?authSource=admin
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=redispassword
depends_on:
- mongodb
- redis
volumes:
- ./server:/app
- /app/node_modules
networks:
- chatters
# production mode
client:
container_name: next-app
build:
context: ./client
args:
NEXT_PUBLIC_SERVER_VARIABLE: ${NEXT_PUBLIC_SERVER_VARIABLE}
restart: always
ports:
- 3000:3000
networks:
- chatters
networks:
chatters:
driver: bridge
volumes:
mongo-data:
redis-data: