Some more changes for Docker
This commit is contained in:
@@ -11,9 +11,18 @@ services:
|
||||
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
||||
depends_on:
|
||||
- apache
|
||||
- node
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
composer-init:
|
||||
image: composer:latest
|
||||
container_name: wkvs-composer-init
|
||||
volumes:
|
||||
- .:/app
|
||||
working_dir: /app/composer
|
||||
command: composer install --no-interaction --prefer-dist
|
||||
|
||||
apache:
|
||||
build: ./config/apache
|
||||
container_name: wkvs-apache
|
||||
@@ -23,6 +32,8 @@ services:
|
||||
depends_on:
|
||||
db-init:
|
||||
condition: service_completed_successfully
|
||||
composer-init:
|
||||
condition: service_completed_successfully
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
@@ -65,6 +76,23 @@ services:
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
node:
|
||||
image: node:latest
|
||||
container_name: wkvs-node
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- .:/var/wkvs
|
||||
working_dir: /var/wkvs/websocket
|
||||
env_file:
|
||||
- ./config/.env.redis
|
||||
environment:
|
||||
- REDDIS_HOST=redis
|
||||
command: sh -c "npm install && npm install -g pm2 && pm2-runtime start index.js --max-memory-restart 1G --node-args=\"--max-old-space-size=1024\" --name=\"WebSocket WKVS\""
|
||||
depends_on:
|
||||
- redis
|
||||
networks:
|
||||
- wkvs
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user