-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (45 loc) · 1000 Bytes
/
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
version: "3.7"
services:
db:
container_name: db
image: mongo:latest
ports:
- "27017:27017"
volumes:
- data-volume:/data/db
- mongo-config:/data/configdb
typescript-backend:
container_name: typescript_backend
build:
context: typescript/
dockerfile: Dockerfile
ports:
- "8080:8080"
links:
- db
command: npm run-script watch
depends_on:
- db
volumes:
- ./typescript:/app-ts:rw
- /app-ts/node_modules
environment:
- MONGO_URL=mongodb://db:27017/local
java-backend:
container_name: java_backend
build:
context: java/
dockerfile: Dockerfile
ports:
- "9000:9000"
links:
- db
depends_on:
- db
command: java -jar /usr/local/lib/ts-java-workshop-0.0.1-SNAPSHOT.jar
environment:
- SPRING_DATA_MONGODB_URI=mongodb://db:27017/local
- spring.data.mongodb.uri=mongodb://db:27017/local
volumes:
data-volume:
mongo-config: