-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
docker-compose.yml
44 lines (42 loc) · 1.08 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
version: '3'
services:
self-deployed-api:
image: node:18
container_name: mongo_search_self_deployed_api
volumes:
- ./self-deployed-api.ts:/self-deployed-api.ts
- ./util.ts:/util.ts
- ./node_modules:/node_modules
- ./tsconfig.json:/tsconfig.json
- ./package.json:/package.json
ports:
- 3000:3000
command: npx ts-node self-deployed-api.ts
env_file: .env.local
environment:
- MONGODB_HOST=mongodb://mongodb:27017
depends_on:
- mongodb
mongodb:
image: mongo:6
container_name: mongo_search_mongodb
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: admin
MONGO_INITDB_ROOT_PASSWORD: password
atlas-api:
image: node:18
container_name: mongo_search_atlas_api
volumes:
- ./atlas-api.ts:/atlas-api.ts
- ./util.ts:/util.ts
- ./node_modules:/node_modules
- ./tsconfig.json:/tsconfig.json
- ./package.json:/package.json
ports:
- 3001:3001
command: npx ts-node atlas-api.ts
env_file: .env.atlas
depends_on:
- mongodb