Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -406,3 +406,5 @@ cypress/videos
npm-debug.log*
yarn-debug.log*
yarn-error.log*

webapp_provider/public
20 changes: 8 additions & 12 deletions webapp_provider/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
FROM node:lts-alpine

# Create app directory
WORKDIR /usr/src/app

RUN apk update && apk upgrade

# Bundle app source
COPY . .

EXPOSE 5000
CMD npx serve -s public
# dockerfile
FROM nginx:latest
RUN apt-get update && apt-get upgrade -y
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/nginx.conf
COPY public /var/www/
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]
46 changes: 46 additions & 0 deletions webapp_provider/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
worker_processes 1;

events { worker_connections 1024; }

http {

include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;

Comment on lines +6 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we need to add default timeouts and upload body size. otherwise users cannot upload large files right?

gzip on;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain application/x-javascript text/xml text/css application/xml;

server {
listen 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-Host $server_name;

location /api {
# use dockers dns resolver
# with this nginx can start even when the other containers are not running
resolver 127.0.0.11 valid=30s;
set $upstream_rest FileFighterREST;
proxy_pass http://$upstream_rest:8080/api/;
proxy_redirect off;
}
location /data {
client_max_body_size 30G;
resolver 127.0.0.11 valid=30s;
set $upstream_Filehandler FileFighterFileHandler;
proxy_pass http://$upstream_Filehandler:5000/data;
proxy_redirect off;
}

location / {
root /var/www;
}
}
}