-
Notifications
You must be signed in to change notification settings - Fork 17
/
docker-compose.yml
44 lines (41 loc) · 1.17 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:
eosstrapi:
build: .
image: eos-strapi
environment:
DATABASE_CLIENT: mongo
DATABASE_NAME: strapi
DATABASE_HOST: mongodb
DATABASE_PORT: 27017
DATABASE_USERNAME: strapi
DATABASE_PASSWORD: password
EOS_CORS_DOMAINS: "http://localhost:3000, http://localhost:4999"
# Using `yes` instead of `true` since docker only allows strings, numbers or null. Having `true` as string can be confusing
WITH_DOCKER: "yes"
restart: unless-stopped
volumes:
- /usr/src/app
networks:
- eos-strapi
ports:
- "1337:1337"
mongodb:
image: mongo
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: strapi
MONGO_INITDB_ROOT_PASSWORD: password
networks:
- eos-strapi
volumes:
- ~/mongo/data:/data/db
- ./mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro
# - ./dummydb:/dummydb
# //TODO: For the future, if we want to restore collections.
# command: mongorestore --username "strapi" --password "password" mongodb://localhost:27017 dummydb
ports:
- "27017:27017"
networks:
eos-strapi:
driver: bridge