-
Notifications
You must be signed in to change notification settings - Fork 24
/
docker-compose.yml
99 lines (99 loc) · 2.89 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
version: '3.2'
services:
mongo:
container_name: $PROJECT_NAME-mongo
build: ./docker/mongo
restart: always
env_file: .env
environment:
- AUTH=yes
- MONGODB_ADMIN_USER=mongo
- MONGODB_ADMIN_PASS=mongo
- MONGODB_APPLICATION_DATABASE=${MONGO_DBNAME}
- MONGODB_APPLICATION_USER=${MONGO_USER}
- MONGODB_APPLICATION_PASS=${MONGO_PASS}
volumes:
- ./docker/mongo/db:/data/db
- ./docker/mongo/config:/data/configdb
networks:
internal-network:
external-network:
aliases:
- $PROJECT_NAME-mongo
ports:
- "27017"
ipfs:
container_name: $PROJECT_NAME-ipfs
image: ipfs/go-ipfs:latest
user: "${UID}:${GID}"
restart: always
env_file: .env
ports:
- "4001"
- "5001"
networks:
internal-network:
external-network:
aliases:
- $PROJECT_NAME-ipfs
server:
container_name: $PROJECT_NAME-server
build:
context: ./server/
user: "${UID}:${GID}"
restart: always
env_file: .env
depends_on:
- mongo
- ipfs
volumes:
- ./server/:/app
- /app/node_modules
working_dir: /app
command: "npm run dev"
networks:
internal-network:
external-network:
aliases:
- $PROJECT_NAME-server
ports:
- "3000:$COMMUNITY_APP_PORT"
environment:
- NODE_ENV=${COMMUNITY_APP_ENV}
- PORT=${COMMUNITY_APP_PORT}
- COMMUNITY_MONGO_URI=mongodb://${MONGO_USER}:${MONGO_PASS}@mongo/${MONGO_DBNAME}
- COMMUNITY_MONGO_USER=${MONGO_USER}
- COMMUNITY_MONGO_PASS=${MONGO_PASS}
- COMMUNITY_MONGO_AUTH_SOURCE=${MONGO_AUTH_SOURCE}
dapp:
container_name: $PROJECT_NAME-dapp
build:
context: ./dapp/
user: "${UID}:${GID}"
restart: always
env_file: .env
depends_on:
- server
volumes:
- ./dapp/:/app
- /app/node_modules
working_dir: /app
command: "npm start"
networks:
internal-network:
external-network:
aliases:
- $PROJECT_NAME-dapp
ports:
- "9000:$COMMUNITY_APP_PORT"
environment:
- NODE_ENV=${COMMUNITY_APP_ENV}
- PORT=${COMMUNITY_APP_PORT}
- COMMUNITY_APP_HOST=server
- COMMUNITY_APP_PORT=${COMMUNITY_APP_PORT}
- COMMUNITY_WEB3_WEBSOCKET_PROVIDER=${COMMUNITY_WEB3_WEBSOCKET_PROVIDER}
networks:
internal-network:
external-network:
external:
name: $PROJECT_NAME