-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathdocker-compose.yml
72 lines (67 loc) · 1.57 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
63
64
65
66
67
68
69
70
71
72
version: "3.7"
services:
app:
build:
context: ./
dockerfile: docker/Dockerfile
image: minichatapp
container_name: minichat-app
restart: unless-stopped
tty: true
working_dir: /var/www/
ports:
- "3001:3000"
volumes:
- ./:/var/www
networks:
- minichat_network
mongo:
image: mongo
restart: unless-stopped
container_name: minichat-mongo
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: minichat
MONGO_INITDB_DATABASE: minichat
networks:
- minichat_network
ports:
- 27018:27017
volumes:
- mongodb:/data/db
- ./docker/mongo:/data/configdb
mongo-express:
image: mongo-express
restart: unless-stopped
container_name: minichat-mongo-express
env_file: ./.env
ports:
- 8082:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: minichat
ME_CONFIG_MONGODB_URL: mongodb://root:minichat@mongo:27017/
ME_CONFIG_MONGODB_AUTH_DATABASE: admin
ME_CONFIG_BASICAUTH_USERNAME: $MONGO_EXPRESS_USER
ME_CONFIG_BASICAUTH_PASSWORD: $MONGO_EXPRESS_PASSWORD
networks:
- minichat_network
depends_on:
- mongo
redis:
image: redis:alpine
restart: unless-stopped
container_name: minichat-redis
command: redis-server --appendonly yes
volumes:
- ./docker/redis:/data
ports:
- 6381:6379
networks:
- minichat_network
networks:
minichat_network:
driver: bridge
volumes:
mongodb:
driver: local