-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
48 lines (45 loc) · 1012 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
46
47
48
version: '3.8'
services:
app:
build:
context: .
container_name: express_app
depends_on:
- mongodb
- redis
restart: always
ports:
- '7000:8000'
volumes:
- .:/var/www
working_dir: /var/www
networks:
- express_network
mongodb:
image: mongo:latest
container_name: express_mongodb
volumes:
- './storage/mongo-volume:/data/db:rw'
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGODB_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGODB_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGODB_DATABASE}
restart: always
ports:
- '27018:27017'
networks:
- express_network
redis:
image: 'redis:alpine'
container_name: express_redis
command: redis-server --requirepass ${REDIS_PASSWORD}
ports:
- '${REDIS_PORT}:6379'
volumes:
- ./storage/redis-data:/var/lib/redis
restart: always
networks:
- express_network
networks:
express_network:
driver: bridge