adding docker-compose
parent
4ecbb5b68c
commit
e2fff7fa58
@ -1,3 +1,7 @@
|
||||
.idea/
|
||||
./node_modules/
|
||||
./package-lock.json
|
||||
./redis_conf/
|
||||
./redis_data/
|
||||
./node_logs/
|
||||
./node_app./
|
||||
node_modules/
|
||||
./node_app/package-lock.json
|
||||
|
@ -0,0 +1,31 @@
|
||||
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
|
||||
restart: always
|
||||
volumes:
|
||||
- ./redis_data/:/var/lib/redis/
|
||||
- ./redis_conf/:/usr/local/etc/redis/
|
||||
environment:
|
||||
- REDIS_REPLICATION_MODE=master
|
@ -0,0 +1,10 @@
|
||||
{
|
||||
"name": "esp-smarthome_server",
|
||||
"version": "1.1.0",
|
||||
"dependencies": {
|
||||
"mime": "^2.4.6",
|
||||
"redis": "^3.0.2",
|
||||
"ws": "^7.3.1",
|
||||
"xmlhttprequest": "^1.8.0"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 265 B After Width: | Height: | Size: 265 B |
Loading…
Reference in New Issue