Skip to content

Commit

Permalink
Merge pull request #33 from julianrojas87/dev
Browse files Browse the repository at this point in the history
v2.0.0
  • Loading branch information
julianrojas87 authored Nov 18, 2021
2 parents eea7a17 + 5df26ff commit 8cd1712
Show file tree
Hide file tree
Showing 42 changed files with 24,418 additions and 5,230 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
### Multi-stage Docker image

# STAGE 1: Start from a Node.js ready container
FROM node:latest AS RCC
FROM node:16 AS RCC
# Create a new directory for app files
RUN mkdir -p /opt/era-compatiblity-check
# Set working directory in the container
Expand All @@ -13,17 +13,18 @@ RUN npm install
# Install envsub to parse environment variables
RUN npm install -g envsub
# Define config variables
ARG ERA_GEO_API=http://era.ilabt.imec.be/ldf
ARG BASE_URI=https://data-interop.era.europa.eu
ARG ZOOM=10
ARG FACETED_BASE_URI=https://linked.ec-dataplatform.eu/describe/?url=
# Parse env variables and build app for production
RUN envsub ./src/config/config.js && npm run build

# STAGE 2: Start from NGINX ready container
FROM nginx
# Copy built application from stage 1
COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
COPY --from=RCC /opt/era-compatiblity-check/dist /usr/share/nginx/html
# Expose HTTP default port

EXPOSE 80
# Start NGINX
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"]
153 changes: 144 additions & 9 deletions README.md

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions nginx/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
user nginx;
worker_processes auto;

error_log /var/log/nginx/error.log notice;
pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;

keepalive_timeout 65;

server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html index.htm;

location / {
try_files $uri /index.html;
}

error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
}

Loading

0 comments on commit 8cd1712

Please sign in to comment.