Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
mc_frontend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Iterations
Jira
Jira
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
callidus
mc_frontend
Commits
f3ee3927
Commit
f3ee3927
authored
Mar 26, 2020
by
Konstantin Schulz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nginx is now running as a separate docker container
parent
0fe343f7
Pipeline
#10904
failed with stage
in 15 seconds
Changes
5
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
33 deletions
+22
-33
.dockerignore
.dockerignore
+2
-0
Dockerfile
Dockerfile
+0
-7
docker-compose.yml
docker-compose.yml
+17
-3
nginx.conf
nginx.conf
+3
-8
src/index.html
src/index.html
+0
-15
No files found.
.dockerignore
View file @
f3ee3927
/node_modules
.git
.gitignore
Dockerfile
View file @
f3ee3927
...
...
@@ -3,8 +3,6 @@ FROM node:10.19.0-stretch
RUN
useradd
-ms
/bin/bash mc
WORKDIR
/home/mc
RUN
apt-get update
RUN
apt-get
-yq
install
nginx
# for testing
RUN
apt update
RUN
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
...
...
@@ -21,10 +19,5 @@ RUN npm install
COPY
. .
COPY
nginx.conf /etc/nginx/nginx.conf
RUN
install
-Dv
/dev/null /run/nginx/nginx.pid
# workaround to fix the missing binding issue for node-sass
RUN
npm rebuild node-sass
# TODO: for some reason, this does not persist?!?!??!
# RUN ionic cordova build browser --prod --release --max-old-space-size=4096
docker-compose.yml
View file @
f3ee3927
...
...
@@ -5,17 +5,31 @@ services:
build
:
context
:
.
dockerfile
:
Dockerfile
command
:
nginx -g "daemon off;"
entrypoint
:
ionic cordova build browser --prod --release --max-old-space-size=4096
environment
:
-
CHROME_BIN=google-chrome
ports
:
-
"
8100:8100"
#
ports:
#
- "8100:8100"
restart
:
always
stdin_open
:
true
tty
:
true
# do not use mounted volume in combination with the node_modules directory being ignored in .dockerignore
# volumes:
# - .:/home/mc/mc_frontend
volumes
:
-
$PWD/www:/home/mc/mc_frontend/platforms/browser/www
nginx
:
command
:
nginx-debug -g "daemon off;"
image
:
nginx:alpine
ports
:
-
"
8100:80"
restart
:
always
volumes
:
-
$PWD/www:/usr/share/nginx/html
-
./nginx.conf:/etc/nginx/nginx.conf
-
./config.xml:/usr/share/nginx/html/config.xml
depends_on
:
-
mc_frontend
networks
:
default
:
external
:
...
...
nginx.conf
View file @
f3ee3927
# /etc/nginx/nginx.conf
user
mc
;
# Set number of worker processes automatically based on number of CPU cores.
worker_processes
auto
;
...
...
@@ -24,7 +22,7 @@ events {
http
{
server
{
listen
8
10
0
;
listen
80
;
server_name
localhost
;
#charset koi8-r;
...
...
@@ -32,7 +30,8 @@ http {
#access_log logs/host.access.log main;
location
/
{
root
/home/mc/mc_frontend/platforms/browser/www
;
root
/usr/share/nginx/html
;
# /home/mc/mc_frontend/platforms/browser/www;
index
index.html
index.htm
;
# enable CORS so the cordova files (config.xml) can be accessed from other domains
add_header
Access-Control-Allow-Origin
*
;
...
...
@@ -138,8 +137,4 @@ http {
# Sets the path, format, and configuration for a buffered log write.
access_log
/var/log/nginx/access.log
main
;
# Includes virtual hosts configs.
include
/etc/nginx/conf.d/*.conf
;
}
src/index.html
View file @
f3ee3927
...
...
@@ -16,21 +16,6 @@
<meta
name=
"apple-mobile-web-app-capable"
content=
"yes"
/>
<meta
name=
"apple-mobile-web-app-status-bar-style"
content=
"black"
/>
<!-- very, very dirty hack to correct the URL for calls to "/config.xml" from the confighelper.js/cordova.js in the cordova-browser package -->
<script>
const
open
=
XMLHttpRequest
.
prototype
.
open
;
XMLHttpRequest
.
prototype
.
open
=
function
(
method
,
url
,
async
,
username
,
password
)
{
async
=
typeof
async
===
'
undefined
'
?
true
:
async
;
username
=
username
||
null
;
password
=
password
||
null
;
if
(
url
===
"
/config.xml
"
)
{
const
base
=
location
.
protocol
.
concat
(
'
//
'
).
concat
(
window
.
location
.
host
)
+
window
.
location
.
pathname
.
split
(
"
/
"
).
slice
(
0
,
-
1
).
join
(
"
/
"
);
url
=
base
+
url
;
}
return
open
.
call
(
this
,
method
,
url
,
async
,
username
,
password
);
};
</script>
<!-- H5P integration, can be called using the global H5P variable -->
<script
src=
"assets/dist/js/h5p-standalone-main.min.js"
></script>
</head>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment