...
 
Commits (2)
......@@ -8,4 +8,4 @@ COPY nginx.conf /etc/nginx/nginx.conf
COPY dev-ssr.conf /etc/nginx/conf.d/dev.conf
COPY nginx_entrypoint_dev.sh /nginx_entrypoint_dev.sh
ENTRYPOINT /nginx_entrypoint_dev.sh
ENTRYPOINT /nginx_entrypoint_dev_ssr.sh
......@@ -29,9 +29,9 @@ server {
port_in_redirect off;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header Host nginx;
proxy_set_header X-NginX-Proxy true;
proxy_pass http://front:4200/;
proxy_pass http://front-live-server:4200/;
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
......
#!/bin/sh
set -e
nginx -g "daemon off;"
......@@ -9,11 +9,11 @@ services:
nginx:
build:
context: ./containers/nginx
dockerfile: ./Dockerfile.dev-sse
dockerfile: ./Dockerfile.dev-ssr
mem_limit: 512MB
depends_on:
- php-fpm
- front
- front-live-server
ports:
- "8080:80"
networks:
......@@ -25,7 +25,17 @@ services:
## WEB APP
front-live-server:
build:
context: ./front/containers/live-server
dockerfile: ./Dockerfile
networks:
- app
volumes:
- ./front/:/var/www/Minds/front:cached
front:
# Static server
build:
context: ./front/dist
dockerfile: ../containers/server/Dockerfile
......
return require('yargs')
.option('verbose', {
description: 'Verbose output',
boolean: true
})
.option('silent', {
description: 'Silent output',
boolean: true
})
.command('up', 'Start the containers', require('./commands/up'))
.command('down', 'Stop the containers', require('./commands/down'))
.command('restart', 'Restart the containers', require('./commands/restart'))
.command('install', 'Installs and provisions the compose stack', require('./commands/install'))
.demandCommand(1, 'Please, specify a command.')
.help()
.strict()
.argv;
const yargs = require('yargs');
const getMissingDeps = require('./helpers/get-missing-deps');
return (async () => {
const missingDeps = await getMissingDeps();
if (missingDeps.length) {
process.stderr.write(
`FATAL: Missing dependencies: ${missingDeps.join(', ')}\n`
);
return process.exit(1);
}
return yargs
.option('verbose', {
description: 'Verbose output',
boolean: true
})
.option('silent', {
description: 'Silent output',
boolean: true
})
.command('up', 'Start the containers', require('./commands/up'))
.command('down', 'Stop the containers', require('./commands/down'))
.command('restart', 'Restart the containers', require('./commands/restart'))
.command('install', 'Installs and provisions the compose stack', require('./commands/install'))
.demandCommand(1, 'Please, specify a command.')
.help()
.strict()
.argv;
})();
......@@ -14,7 +14,7 @@ module.exports.handler = async argv => {
require('../tasks/cleanup'),
require('../tasks/provision-elasticsearch'),
require('../tasks/install-minds'),
// require('../tasks/restart'),
require('../tasks/restart'),
], {
renderer
});
......
const exec = require('../lib/exec');
module.exports = async function() {
const missingDeps = [];
try {
await exec('git', ['--version']);
} catch (e) {
missingDeps.push('git');
}
try {
await exec('docker', ['-v']);
} catch (e) {
missingDeps.push('docker');
}
try {
await exec('docker-compose', ['-v']);
} catch (e) {
missingDeps.push('docker-compose');
}
return missingDeps;
};
#!/usr/bin/env bash
set -e
cd "$(dirname "${BASH_SOURCE[0]}")"
npx npm-install-if-needed@1.0.16 && node cli.js $@
npx npm-install-if-needed --package npm-install-if-needed@1.0 1> /dev/null
node cli.js $@
......@@ -7,6 +7,7 @@
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"npm-install-if-needed": "^1.0.16",
"yargs": "^15.1.0",
"listr": "^0.14.3",
"execa": "^4.0.0"
......