version: '3' services: node: image: node 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 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