Skip to content

Commit

Permalink
Fix dockerfiles for backend
Browse files Browse the repository at this point in the history
  • Loading branch information
mwithi committed Sep 10, 2024
1 parent 13cf97e commit be74702
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
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

0 comments on commit be74702

Please sign in to comment.