-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
63 lines (57 loc) · 1.33 KB
/
docker-compose.yaml
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
version: '3.3'
services:
mongodb:
image: mongo
restart: always
container_name: mongodb
environment:
MONGO_INITDB_ROOT_USERNAME: mongoadmin
MONGO_INITDB_ROOT_PASSWORD: mongoadmin
ports:
- "27017:27017"
volumes:
- ./workspace:/workspace
- type: volume
source: mongodb_data_volume
target: /data/db
mongo-express:
image: mongo-express
container_name: mongo-express
restart: always
ports:
- "28081:8081"
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: veryHardPassword
ME_CONFIG_MONGODB_ADMINUSERNAME: mongoadmin
ME_CONFIG_MONGODB_ADMINPASSWORD: mongoadmin
ME_CONFIG_MONGODB_URL: mongodb://mongoadmin:mongoadmin@localhost:27017/
depends_on:
- mongodb
redis-rate-limit:
image: redis
container_name: redis-rate-limit
ports:
- 6379:6379
volumes:
- redis:/data
posts-api:
container_name: posts-api
build:
dockerfile: Dockerfile
context: .
target: development
env_file:
- .env.local
command: npm run start
ports:
- "3000:3000"
depends_on:
- mongodb
- redis-rate-limit
volumes:
mongodb_data_volume:
driver: local
redis:
driver: local