Some more changes for Docker
This commit is contained in:
+1
-3
@@ -7,9 +7,7 @@ config/.env.wk-id
|
||||
config/.env.mail
|
||||
config/.env.db-wkvs-user
|
||||
websocket/node_modules
|
||||
websocket/package-lock.json
|
||||
websocket/package.json
|
||||
composer
|
||||
composer/vendor
|
||||
private-files/rechnungen/*
|
||||
private-files/config-uploads/*
|
||||
.php-ini
|
||||
|
||||
@@ -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:
|
||||
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"require": {
|
||||
"vlucas/phpdotenv": "^5.6",
|
||||
"phpmailer/phpmailer": "^7.0",
|
||||
"shuchkin/simplexlsx": "^1.1",
|
||||
"sprain/swiss-qr-bill": "^5.3",
|
||||
"james-heinrich/getid3": "^1.9",
|
||||
"chriskonnertz/string-calc": "^2.0",
|
||||
"tecnickcom/tcpdf": "^6.11",
|
||||
"predis/predis": "^3.5"
|
||||
}
|
||||
}
|
||||
Generated
+1583
File diff suppressed because it is too large
Load Diff
@@ -5,5 +5,8 @@ RUN a2enmod rewrite
|
||||
|
||||
RUN docker-php-ext-install mysqli && docker-php-ext-enable mysqli
|
||||
|
||||
# The php:apache image handles the "start" command automatically,
|
||||
# so we don't need to add anything else here.
|
||||
# Set Apache DocumentRoot to /var/wkvs/www
|
||||
ENV APACHE_DOCUMENT_ROOT /var/wkvs/www
|
||||
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf \
|
||||
&& sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf \
|
||||
&& sed -i 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
|
||||
@@ -4,8 +4,16 @@ http {
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
location / {
|
||||
proxy_pass http://apache:80;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
}
|
||||
|
||||
location /ws/ {
|
||||
proxy_pass http://127.0.0.1:8082;
|
||||
proxy_pass http://node:8082;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
|
||||
Generated
+135
@@ -0,0 +1,135 @@
|
||||
{
|
||||
"name": "websocket",
|
||||
"version": "1.0.0",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "websocket",
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dotenv": "^17.4.1",
|
||||
"redis": "^5.11.0",
|
||||
"ws": "^8.20.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@redis/bloom": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@redis/bloom/-/bloom-5.11.0.tgz",
|
||||
"integrity": "sha512-KYiVilAhAFN3057afUb/tfYJpsEyTkQB+tQcn5gVVA7DgcNOAj8lLxe4j8ov8BF6I9C1Fe/kwlbuAICcTMX8Lw==",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redis/client": "^5.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@redis/client": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@redis/client/-/client-5.11.0.tgz",
|
||||
"integrity": "sha512-GHoprlNQD51Xq2Ztd94HHV94MdFZQ3CVrpA04Fz8MVoHM0B7SlbmPEVIjwTbcv58z8QyjnrOuikS0rWF03k5dQ==",
|
||||
"dependencies": {
|
||||
"cluster-key-slot": "1.1.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@node-rs/xxhash": "^1.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"@node-rs/xxhash": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@redis/json": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@redis/json/-/json-5.11.0.tgz",
|
||||
"integrity": "sha512-1iAy9kAtcD0quB21RbPTbUqqy+T2Uu2JxucwE+B4A+VaDbIRvpZR6DMqV8Iqaws2YxJYB3GC5JVNzPYio2ErUg==",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redis/client": "^5.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@redis/search": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@redis/search/-/search-5.11.0.tgz",
|
||||
"integrity": "sha512-g1l7f3Rnyk/xI99oGHIgWHSKFl45Re5YTIcO8j/JE8olz389yUFyz2+A6nqVy/Zi031VgPDWscbbgOk8hlhZ3g==",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redis/client": "^5.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@redis/time-series": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/@redis/time-series/-/time-series-5.11.0.tgz",
|
||||
"integrity": "sha512-TWFeOcU4xkj0DkndnOyhtxvX1KWD+78UHT3XX3x3XRBUGWeQrKo3jqzDsZwxbggUgf9yLJr/akFHXru66X5UQA==",
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@redis/client": "^5.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/cluster-key-slot": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/cluster-key-slot/-/cluster-key-slot-1.1.2.tgz",
|
||||
"integrity": "sha512-RMr0FhtfXemyinomL4hrWcYJxmX6deFdCxpJzhDttxgO1+bcCnkk+9drydLVDmAMG7NE6aN/fl4F7ucU/90gAA==",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "17.4.1",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-17.4.1.tgz",
|
||||
"integrity": "sha512-k8DaKGP6r1G30Lx8V4+pCsLzKr8vLmV2paqEj1Y55GdAgJuIqpRp5FfajGF8KtwMxCz9qJc6wUIJnm053d/WCw==",
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://dotenvx.com"
|
||||
}
|
||||
},
|
||||
"node_modules/redis": {
|
||||
"version": "5.11.0",
|
||||
"resolved": "https://registry.npmjs.org/redis/-/redis-5.11.0.tgz",
|
||||
"integrity": "sha512-YwXjATVDT+AuxcyfOwZn046aml9jMlQPvU1VXIlLDVAExe0u93aTfPYSeRgG4p9Q/Jlkj+LXJ1XEoFV+j2JKcQ==",
|
||||
"dependencies": {
|
||||
"@redis/bloom": "5.11.0",
|
||||
"@redis/client": "5.11.0",
|
||||
"@redis/json": "5.11.0",
|
||||
"@redis/search": "5.11.0",
|
||||
"@redis/time-series": "5.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 18"
|
||||
}
|
||||
},
|
||||
"node_modules/ws": {
|
||||
"version": "8.20.0",
|
||||
"resolved": "https://registry.npmjs.org/ws/-/ws-8.20.0.tgz",
|
||||
"integrity": "sha512-sAt8BhgNbzCtgGbt2OxmpuryO63ZoDk/sqaB/znQm94T4fCEsy/yV+7CdC1kJhOU9lboAEU7R3kquuycDoibVA==",
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bufferutil": "^4.0.1",
|
||||
"utf-8-validate": ">=5.0.2"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"bufferutil": {
|
||||
"optional": true
|
||||
},
|
||||
"utf-8-validate": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "websocket",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"dotenv": "^17.4.1",
|
||||
"redis": "^5.11.0",
|
||||
"ws": "^8.20.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user