-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
68 lines (62 loc) · 1.57 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
version: '3'
services:
mongo_db:
build:
context: ./bin/mongodb
container_name: ${COMPOSE_PROJECT_NAME}-mongo
restart: always
ports:
- 27017:27017
volumes:
- mongo_db:/data/db
- ${DB_INITDB_DIR-./config/initdb}:/docker-entrypoint-initdb.d
- ${DB_DATA_DIR-./data/mongodb}:/data/db
- ${DB_LOG_DIR-./logs/mongodb}:/var/log/mongodb
mongo_express:
build:
context: ./bin/mongo_express
container_name: ${COMPOSE_PROJECT_NAME}-mongo-express
links:
- mongo_db
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_BASICAUTH_USERNAME: ${DB_USER}
ME_CONFIG_BASICAUTH_PASSWORD: ${DB_PASSWORD}
ME_CONFIG_MONGODB_SERVER: mongo_db
volumes:
- /sessions
depends_on:
- mongo_db
backend:
build:
context: ${DOCUMENT_ROOT}/backend
container_name: ${COMPOSE_PROJECT_NAME}-backend
ports:
- 3000:3000
environment:
APP_NAME: ${COMPOSE_PROJECT_NAME}
PORT: ${BACKEND_PORT}
DB_URI: mongodb://mongo_db:${DB_PORT}/${DB_NAME}
depends_on:
- mongo_db
frontend:
build:
context: ${DOCUMENT_ROOT}/frontend
container_name: ${COMPOSE_PROJECT_NAME}-frontend
volumes:
- ./www/frontend:/var/www/html
- ${FRONTEND_LOG_DIR-./logs/apache}:/var/log/apache2
ports:
- "80:80"
depends_on:
- backend
redis:
build:
context: ./bin/redis
container_name: "${COMPOSE_PROJECT_NAME}-redis"
ports:
- "127.0.0.1:${HOST_MACHINE_REDIS_PORT}:6379"
volumes:
mongo_db: {}