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.
44 lines
793 B
YAML
44 lines
793 B
YAML
version: '3'
|
|
|
|
services:
|
|
app:
|
|
image: node:alpine
|
|
restart: always
|
|
ports:
|
|
- "3000:3000"
|
|
volumes:
|
|
- ./:/home/node/app/
|
|
- ./logs/:/var/log/
|
|
working_dir: /home/node/app/
|
|
environment:
|
|
- NODE_ENV=production
|
|
command: sh -c 'npm i && nodejs app.js'
|
|
links:
|
|
- redis
|
|
depends_on:
|
|
- redis
|
|
|
|
redis:
|
|
image: redis
|
|
expose:
|
|
- 6379
|
|
restart: always
|
|
volumes:
|
|
- ./redis_data/:/var/lib/redis/
|
|
- ./redis_conf/:/usr/local/etc/redis/
|
|
environment:
|
|
- REDIS_REPLICATION_MODE=master
|
|
|
|
nginx:
|
|
image: nginx:alpine
|
|
restart: always
|
|
volumes:
|
|
- ./nginx.conf:/etc/nginx/nginx.conf
|
|
- ./public:/var/www/html
|
|
ports:
|
|
- "8080:8080"
|
|
links:
|
|
- app
|
|
depends_on:
|
|
- app
|