-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (49 loc) · 1.25 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
version: "3.8"
services:
redis:
container_name: blazeredis2
image: "redis:6.0-alpine"
restart: always
command: ["redis-server", "--bind", "redis", "--port", "6379"]
# command: redis-server --requirepass sOmE_sEcUrE_pAsS
ports:
- "6380:6379"
volumes:
- cache:/data
environment:
- REDIS_REPLICATION_MODE=master
# networks:
# node_net:
# ipv4_address: 172.28.1.4
web:
build: . #look for Dockerfile in current directory local machine
depends_on:
- redis
# deploy:
# restart_policy:
# condition: on-failure
ports:
- 6000:6000 #container port: local server port
volumes:
- ./:/usr/src/app #changes storing as cache /usr/src/app
- /use/src/app/mode_modules #separating node modules of container and local machine
command: npm run dev
# environment:
# REDIS_HOST: redis
# REDIS_PORT: 6379
# REDIS_PASSWORD: sOmE_sEcUrE_pAsS
# networks:
# - webnet
environment:
# DATABASE_URL: postgres://postgres@postgres/webapp_dev
#type://username@host/db_name
PORT: 6000
volumes:
cache:
driver: local
# networks:
# node_net:
# ipam:
# driver: default
# config:
# - subnet: 172.28.0.0/16