Skip to content
Projects
Groups
Snippets
Help
Sign in / Register
Toggle navigation
Minds
Project overview
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Locked Files
Issues
119
Merge Requests
14
CI / CD
Security & Compliance
Packages
Analytics
Wiki
Members
Collapse sidebar
Close sidebar
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Minds
Minds
Compare Revisions
5bba16535f224c072a4e22ae9e47b71d6a60d087...eaffbd9b0c421eea3f97c7a68b1bee83b61200a0
Source
eaffbd9b0c421eea3f97c7a68b1bee83b61200a0
...
Target
5bba16535f224c072a4e22ae9e47b71d6a60d087
Compare
Commits (2)
(chore): Check dependencies, hide niin package output
· 2657f5fe
Emiliano Balbuena
authored
3 hours ago
2657f5fe
(wip): SSR (not-so-live-reloadly) server
· eaffbd9b
Emiliano Balbuena
authored
1 hour ago
eaffbd9b
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
82 additions
and
24 deletions
+82
-24
containers/nginx/Dockerfile.dev-ssr
View file @
eaffbd9b
...
...
@@ -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
This diff is collapsed.
containers/nginx/dev-ssr.conf
View file @
eaffbd9b
...
...
@@ -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
;
...
...
This diff is collapsed.
containers/nginx/nginx_entrypoint_dev_ssr.sh
0 → 100755
View file @
eaffbd9b
#!/bin/sh
set
-e
nginx
-g
"daemon off;"
This diff is collapsed.
docker-compose.yml
View file @
eaffbd9b
...
...
@@ -9,11 +9,11 @@ services:
nginx
:
build
:
context
:
./containers/nginx
dockerfile
:
./Dockerfile.dev-ss
e
dockerfile
:
./Dockerfile.dev-ss
r
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
...
...
This diff is collapsed.
local/cli.js
View file @
eaffbd9b
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
;
})();
This diff is collapsed.
local/commands/install.js
View file @
eaffbd9b
...
...
@@ -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
});
...
...
This diff is collapsed.
local/helpers/get-missing-deps.js
0 → 100644
View file @
eaffbd9b
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
;
};
This diff is collapsed.
local/local
View file @
eaffbd9b
#!/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
$@
This diff is collapsed.
local/package.json
View file @
eaffbd9b
...
...
@@ -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"
...
...
This diff is collapsed.