Skip to content

Commit

Permalink
Merge branch 'develop' into feature/OH2-287-admin-user-group-crud
Browse files Browse the repository at this point in the history
  • Loading branch information
gasp committed Sep 12, 2024
2 parents e259cf2 + 0588806 commit 88defc1
Show file tree
Hide file tree
Showing 21 changed files with 353 additions and 326 deletions.
59 changes: 31 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ _This project is still in early stages. For a more mature user interface of Open
This project is based on React. To learn React, check out the [React documentation](https://reactjs.org/).
To install the project dependencies, issue:

- npm i
npm i

**It has to be done before any of the following activities**

Expand All @@ -29,29 +29,32 @@ Examples:

- you want to develop using real api instead of mocked: use this `.env.local` file

```
# .env.local
REACT_APP_USE_MOCK_API=
```
```
# .env.local
REACT_APP_USE_MOCK_API=
```

- then: `npm start`
then `npm start`

- you want to connect your local dev environment to docker api:
```
# .env.local
REACT_APP_USE_MOCK_API=
REACT_APP_BASE_PATH=http://localhost:8080/oh-api
```
- then: `docker-compose up && npm start`

```
# .env.local
REACT_APP_USE_MOCK_API=
REACT_APP_BASE_PATH=http://localhost:8080/oh-api
```

then `docker-compose up database backend && npm start`

## Run local development environment

- npm start
npm start

## Run full stack environment locally

You can run a full OH2 stack locally using [Docker](https://www.docker.com/) (required) using this command:
( - docker-compose up

docker-compose up

Then you can access to:

Expand All @@ -61,7 +64,7 @@ Then you can access to:

## How to publish on Web Server

- npm run build:staging
npm run build:staging

Then connect to the Intesys VPN and open FileZilla.

Expand All @@ -82,39 +85,39 @@ Once you are logged in, go under /home/httpd/open-hospital/shared/public and rep

Easy step:

- git push intesys-remote develop
git push intesys-remote develop

Old method:

- npm run build:gh-pages
- git commit
npm run build:gh-pages
git commit

then
then

- git subtree push --prefix build intesys-oh gh-pages
git subtree push --prefix build intesys-oh gh-pages

or
or

- git subtree split --prefix build develop
- git push intesys-oh GIT_ID:gh-pages --force
git subtree split --prefix build develop
git push intesys-oh GIT_ID:gh-pages --force

## How to launch the application

You can run a development build of the application by issuing:

- npm start
npm start

## How to run unit tests

To run unit tests, issue:

- npm test
npm test

## How to launch the e2e tests

Run:

- npm run e2e
npm run e2e

it launches application in development mode and starts cypress, in a single process.

Expand All @@ -123,10 +126,10 @@ it launches application in development mode and starts cypress, in a single proc
If you want more control over **Cypress e2e tests**, use two different processes: one for serving the app (**process #1**) and one for running the Cypress Test Runner (**process #2**). You can launch it by issuing the following commands in two different intances of your terminal:

//process #1
- npm start
npm start

//process #2
- npm run cypress:open
npm run cypress:open

Once the app is compiled and served, and the Cypress Test Runner is launched, click on _Run all specs_

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ x-mariadb: &mariadb-env
MARIADB_ROOT_PASSWORD: root
MARIADB_USER: isf
MARIADB_PASSWORD: isf123
OH_DEMO_LANG: en
OH_DB_LANG: en
x-ui: &ui-env
<<: *repository-args
PUBLIC_URL: /
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile.backend
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ RUN --mount=type=cache,target=/root/.m2 mvn clean install -DskipTests=true

# CMD mvn spring-boot:run
WORKDIR /openhospital-api/target
CMD java -cp "openhospital-api-0.1.0.jar:rsc/:static/" org.springframework.boot.loader.JarLauncher
CMD java -cp "openhospital-api-0.1.0.jar:rsc/:static/" org.springframework.boot.loader.launch.JarLauncher
17 changes: 9 additions & 8 deletions docker/Dockerfile.database
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
FROM mariadb:10.6.11

ARG OH_DB_LANG=en

ARG GITHUB_ORG=informatici
ARG OH_CORE_BRANCH=develop
ARG MARIADB_PORT
ARG MARIADB_DATABASE
ARG MARIADB_ROOT_PASSWORD
ARG MARIADB_USER
ARG MARIADB_PASSWORD
ARG OH_DEMO_LANG
# ENV MYSQL_DATABASE=oh
# ENV MYSQL_ROOT_PASSWORD=root
# ENV MYSQL_USER=isf
# ENV MYSQL_PASSWORD=isf123

RUN apt-get update
RUN apt-get install git -y
Expand All @@ -22,8 +19,8 @@ EXPOSE 3306

RUN cp sql/step_01_create_structure.sql /docker-entrypoint-initdb.d/
RUN cp sql/step_02_dump_menu.sql /docker-entrypoint-initdb.d/
RUN cp sql/step_03_dump_default_data_en.sql /docker-entrypoint-initdb.d/
#RUN cp sql/step_04_all_following_steps.sql /docker-entrypoint-initdb.d/
RUN cp sql/step_03_dump_default_data_${OH_DB_LANG}.sql /docker-entrypoint-initdb.d/
#COPY sql/step_04_all_following_steps.sql /docker-entrypoint-initdb.d/
RUN cp sql/step_05_update_menu_i18n.sql /docker-entrypoint-initdb.d/
RUN cp sql/step_06_opd_extended.sql /docker-entrypoint-initdb.d/
RUN cp sql/step_07_modifiche_matiri.sql /docker-entrypoint-initdb.d/
Expand All @@ -39,7 +36,11 @@ RUN cp sql/step_7* /docker-entrypoint-initdb.d/
RUN cp sql/step_8* /docker-entrypoint-initdb.d/
RUN cp sql/step_9* /docker-entrypoint-initdb.d/
RUN cp sql/step_a1* /docker-entrypoint-initdb.d/
RUN mkdir data_en && cp sql/data_en/* data_en/
RUN mkdir data_${OH_DB_LANG} && cp sql/data_${OH_DB_LANG}/* data_${OH_DB_LANG}/
RUN cp sql/step_03_dump_vaccine_data_${OH_DB_LANG}.sql /docker-entrypoint-initdb.d/step_z100_dump_vaccine_data_${OH_DB_LANG}.sql
RUN cp sql/step_03_dump_dicomtype_data_${OH_DB_LANG}.sql /docker-entrypoint-initdb.d/step_z101_dump_dicomtype_data_${OH_DB_LANG}.sql

# optional steps
#RUN cp sql/delete_all_data.sql /docker-entrypoint-initdb.d/step_9990_delete_all_data.sql
#RUN cp sql/load_demo_data.sql /docker-entrypoint-initdb.d/step_9991_load_demo_data.sql
#RUN cp sql/extra/reset_admin_password_strong.sql /docker-entrypoint-initdb.d/step_9992_reset_admin_password_strong.sql
Loading

0 comments on commit 88defc1

Please sign in to comment.