forked from ocaml-sf/learn-ocaml
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathdocker-compose.yml
59 lines (53 loc) · 1.18 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
version: "3"
services:
learn-ocaml-server:
build:
context: .
dockerfile: Dockerfile
# args:
# - TZ=${TZ}
env_file:
- .env
links:
- "nodejs:nodeserver"
ports:
- "0.0.0.0:80:${LEARNOCAML_PORT}"
expose:
- "8080"
volumes:
- ${REPOSITORY}:/repository:ro
- learn-ocaml-sync:/sync
mongodb:
image: mongo:latest
environment:
# MONGO_INITDB_ROOT_USERNAME: root
# MONGO_INITDB_ROOT_PASSWORD: rootpassword
MONGO_INITDB_DATABASE: learn-ocaml-code
ports:
- "27017:27017"
expose:
- "27017"
volumes:
- mongodb_data_container:/etc/mongod.conf
- mongodb_data_container:/docker-entrypoint-initdb.d/
- mongodb_data_container:/data/db/
- mongodb_data_container:/var/log/mongodb/
nodejs:
build:
context: node/
ports:
- "0.0.0.0:8000:8000"
environment:
- PORT=8000
- DB_CONN=mongodb://mongodb:27017/learn-ocaml-code
volumes:
- ./node:/node/app
- node_modules:/node/app/node_modules
depends_on:
- mongodb
volumes:
repository:
sync:
learn-ocaml-sync:
mongodb_data_container:
node_modules: