You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
739 B
YAML

version: '3'
services:
node:
image: node:alpine
container_name: esp-smarthome_node
restart: always
ports:
- "8080:8080"
- "8081:8081"
volumes:
- ./node_app/:/home/node/app/
# - ./node_modules/:/home/node/app/node_modules/
- ./node_logs/:/var/log/
working_dir: /home/node/app/
environment:
- NODE_ENV=production
command: sh -c 'npm i && nodejs server.js'
links:
- redis
redis:
image: redis:alpine
container_name: esp-smarthome_redis
expose:
- 6379
ports:
- 6379:6379
restart: always
volumes:
- ./redis_data/:/data/
- ./redis_conf/:/usr/local/etc/redis/
environment:
- REDIS_REPLICATION_MODE=master