Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/24.04 #134

Merged
merged 36 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
ec72ace
Update docker.yml
dragos-dobre Oct 4, 2023
4cd785f
Update package.json
dragos-dobre Dec 21, 2023
066d999
Merge pull request #110 from openimis/dragos-dobre-patch-1
dragos-dobre Dec 21, 2023
c387fff
OP-1750: avoid modules duplicates
olewandowski1 Jan 26, 2024
1b1c20b
OP-1750: prettier
olewandowski1 Jan 26, 2024
2250210
OP-1750: add try catch block when loading modules
olewandowski1 Jan 26, 2024
d7e9e66
Merge pull request #115 from openimis/feature/OP-1750
jdolkowski Jan 29, 2024
acca882
add opensearch token
delcroip Jan 31, 2024
6940a3f
Merge pull request #117 from openimis/feature/add-OS-token
delcroip Jan 31, 2024
620c2b5
replace all existing env VAR
delcroip Feb 27, 2024
61bbc6e
release 24.04
delcroip Mar 8, 2024
e22059d
OP-1847: improve modules js generation
olewandowski1 Mar 21, 2024
d6122d0
OP-1848: update ref translations
olewandowski1 Mar 22, 2024
2cccd38
Merge pull request #123 from openimis/feature/OP-1847
delcroip Mar 22, 2024
7434c7c
Merge pull request #124 from openimis/feature/OP-1848
delcroip Mar 25, 2024
91b767d
24.04 version
delcroip Apr 2, 2024
7644510
coreMIS modules
delcroip Apr 11, 2024
2601265
Update openimis.json
delcroip Apr 12, 2024
dda27f2
Merge pull request #127 from openimis/add-coremis-2
delcroip Apr 12, 2024
b8ebdaa
fallback on grievance std
delcroip Apr 12, 2024
a021fa7
fix: merge develop branch to the release one
olewandowski1 Apr 12, 2024
9a0176b
Update openimis.json
delcroip Apr 12, 2024
85d9387
Update openimis.json
delcroip Apr 12, 2024
70777dc
Merge pull request #128 from openimis/fix/merge-develop-to-release-br…
delcroip Apr 12, 2024
23f5569
missing coma
delcroip Apr 12, 2024
cb7e588
modular reverse proxy
delcroip Apr 16, 2024
e0075ea
adding OPENSEARCH_BASIC_TOKEN ENV var
delcroip Apr 17, 2024
b9bc370
Merge pull request #130 from openimis/feature/modular-reverse-proxy
delcroip Apr 17, 2024
2a33979
fixing reverse proxy
delcroip Apr 17, 2024
c8b98ab
remove lock file
delcroip Apr 17, 2024
96dc124
Merge pull request #131 from openimis/feature/remove-grievance
delcroip Apr 17, 2024
efda11e
Merge branch 'release/24.04' into to-release
delcroip Apr 23, 2024
6b7b7be
Merge pull request #132 from openimis/to-release
delcroip Apr 23, 2024
4303b16
Update openimis.json
delcroip Apr 30, 2024
6483970
minor patches
delcroip May 1, 2024
0f1d499
Merge branch 'main' into release/24.04
delcroip May 2, 2024
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
1 change: 1 addition & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: create daily docker image on develop
on:
workflow_dispatch:
schedule:
- cron: "0 2 * * *"
jobs:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ COPY --from=build-stage /app/build/ /usr/share/nginx/html
#COPY DEFAULT CERTS
COPY --from=build-stage /etc/ssl/private/ /etc/nginx/ssl/live/host

COPY conf/openimis.conf /conf/openimis.conf
COPY ./conf /conf
COPY script/entrypoint.sh /script/entrypoint.sh
RUN chmod a+x /script/entrypoint.sh
WORKDIR /script
Expand Down
38 changes: 11 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,19 @@
# openIMIS Frontend Reference Implementation : Windows Docker
# openIMIS frontend assembly

This repository holds the configuration files for the openIMIS Frontend Reference Implementation:
## running

- Legacy web application
- Modular front end
this repository builds:

Please look for the direction on the openIMIS Wiki: https://openimis.atlassian.net/wiki/spaces/OP/pages/963182705/MO1.1+Install+the+modular+openIMIS+using+Docker
- a docker image `ghcr.io/openimis/openimis-fe` that can be use in a docker compose
- a minified js application that can be served by any webserver (see release)

Note: the modular frontend is part of the release ZIP of the legacy webapp, if the modular frontend need to be changed then new modular frontend static files need to be placed in /inetroot/www/openIMIS/front
the build content is defined by the openimis.json file

Note 2: The docker file can be change to build first the frontend by uncommenting the "downloader" related lines.

This repo branches, tags,... are maintained by openIMIS official delivery team who use it to build the official openIMIS Docker images containing the official modules (versions) list.

In case of troubles, please consult/contact our service desk via our [ticketing site](https://openimis.atlassian.net/servicedesk/customer).

# openIMIS Frontend Reference Implementation : Linux

This repository holds the configuration files for the openIMIS Frontend Reference Implementation.
It serves 2 distinct use cases:

- developers who want to implement new modules or modify existing frontend modules of openIMIS
- distributors who want to assemble modules into a Docker image for delivery

Note: please, refer to [openIMIS Frontend localisation](i18n.md) to provide translations and bind user's language to a locale for data format (dates, numbers,...)

This repo branches, tags,... are maintained by openIMIS official delivery team who use it to build the official openIMIS Docker images containing the official modules (versions) list.

In case of troubles, please consult/contact our service desk via our [ticketing site](https://openimis.atlassian.net/servicedesk/customer).

[![License: AGPL v3](https://img.shields.io/badge/License-AGPL%20v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
more information for:

- [docker Windows](/docs/WINDOWS_DOCKER.md)
- [docker Linux](/docs/LINUX_DOCKER.md)
- [reverse proxy toward other openIMIS services](/docs/reverse_proxy.md)

## Developers setup

Expand Down
21 changes: 21 additions & 0 deletions conf/locations/backend.loc
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

location /${REACT_APP_API_URL}/ {

proxy_pass http://${backend};
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;
proxy_set_header X-Forwarded-Proto https;
}
location = /check_user/ {
internal;
proxy_pass_request_body off;
proxy_set_header Content-Length "";
proxy_set_header X-Original-URI $request_uri;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://${backend}/${REACT_APP_API_URL}/core/users/current_user/;
}


3 changes: 3 additions & 0 deletions conf/locations/certbot.loc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
10 changes: 10 additions & 0 deletions conf/locations/frontend.loc
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@


location / {
return 302 https://$host/${PUBLIC_URL}/;
}

location /${PUBLIC_URL} {
try_files $uri $uri/ /${PUBLIC_URL}/index.html;
#error_page 404 $scheme://$host/front/;
}
14 changes: 14 additions & 0 deletions conf/locations/lightning.loc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

location /lightning/ {

rewrite /lightning/(.*) /$1 break;
proxy_pass http://${lightning};
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-Proto https;
proxy_set_header X-Forwarded-Host $server_name;


}

13 changes: 13 additions & 0 deletions conf/locations/opensearch.loc
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

location /opensearch/ {
auth_request /check_user/;
proxy_pass http://${opensearch};
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-Proto https;
proxy_set_header X-Forwarded-Host $server_name;
proxy_set_header Authorization "Basic ${OPENSEARCH_BASIC_TOKEN}";

}

14 changes: 14 additions & 0 deletions conf/locations/restapi.loc.bk
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@


location /${ROOT_MOBILEAPI}/ {

#this rewrite rule is required to remove "ROOT_MOBILEAPI" because implicite rule (/ at the end of the url) donc work with variable
rewrite /${ROOT_MOBILEAPI}/(.*) /$1 break;
proxy_pass http://${restapi};
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-Proto https;
proxy_set_header X-Forwarded-Host $server_name;

}
56 changes: 13 additions & 43 deletions conf/openimis.conf
Original file line number Diff line number Diff line change
@@ -1,50 +1,20 @@

server {
resolver 127.0.0.11 valid=30s;
set $dockerbackend "backend:8000";
set $dockerrestapi "restapi:80";
resolver 127.0.0.11 valid=30s;

client_max_body_size ${DATA_UPLOAD_MAX_MEMORY_SIZE};
listen 443 ssl;
listen 80;
server_name ${NEW_OPENIMIS_HOST};

ssl_certificate /etc/letsencrypt/live/${NEW_OPENIMIS_HOST}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${NEW_OPENIMIS_HOST}/privkey.pem;
root /usr/share/nginx/html;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location /.well-known {
root /var/www/html;
}
client_max_body_size ${DATA_UPLOAD_MAX_MEMORY_SIZE};
listen 443 ssl;
listen 80;
server_name ${NEW_OPENIMIS_HOST};

location / {
return 302 https://$host/${PUBLIC_URL}/${REDIRECT_TAIL};
}
ssl_certificate /etc/letsencrypt/live/${NEW_OPENIMIS_HOST}/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/${NEW_OPENIMIS_HOST}/privkey.pem;
root /usr/share/nginx/html;

location /${PUBLIC_URL} {
try_files $uri $uri/ /${PUBLIC_URL}/index.html;
#error_page 404 $scheme://$host/front/;
}
location /.well-known {
root /var/www/html;
}
###INCLUDE_PLACEHOLDER###

location /${REACT_APP_API_URL}/ {
proxy_pass http://${dockerbackend};
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;
proxy_set_header X-Forwarded-Proto https;
}

location /${ROOT_MOBILEAPI}/ {
#this rewrite rule is required to remove "ROOT_MOBILEAPI" because implicite rule (/ at the end of the url) donc work with variable
rewrite /${ROOT_MOBILEAPI}/(.*) /$1 break;
proxy_pass http://${dockerrestapi};
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-Proto https;
proxy_set_header X-Forwarded-Host $server_name;
}
}
}
4 changes: 4 additions & 0 deletions conf/variables/var.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
set $backend "backend:8000";
set $opensearch "opensearch-dashboards:5601";
set $lightning "lightning:4000";
set $frontend "lightning:4000";
Loading
Loading