-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e355d56
commit bc61e34
Showing
13 changed files
with
114 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
HCW_DOCTOR_VERSION=5.0.9 | ||
HCW_ADMIN_VERSION=5.0.2 | ||
HCW_BACKEND_VERSION=5.0.19 | ||
HCW_PATIENT_VERSION=5.0.14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
ARG HCW_ADMIN_VERSION | ||
FROM iabsis/hcw-admin:${HCW_ADMIN_VERSION} AS i18n-layer | ||
FROM iabsis/hcw-admin:${HCW_ADMIN_VERSION} AS init-layer | ||
|
||
FROM init-layer AS i18n-layer | ||
USER root | ||
RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/* | ||
COPY assets/* /usr/share/nginx/html/assets/i18n | ||
RUN bash /usr/share/nginx/html/assets/i18n/combine.sh | ||
|
||
|
||
FROM iabsis/hcw-admin:${HCW_ADMIN_VERSION} | ||
|
||
FROM init-layer | ||
COPY --from=i18n-layer /usr/share/nginx/html/assets/i18n/*.json /usr/share/nginx/html/assets/i18n/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
ARG HCW_BACKEND_VERSION | ||
FROM iabsis/hcw-backend:${HCW_BACKEND_VERSION} AS i18n-layer | ||
FROM iabsis/hcw-backend:${HCW_BACKEND_VERSION} AS init-layer | ||
FROM init-layer AS i18n-layer | ||
USER root | ||
RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/* | ||
COPY assets/* /usr/src/app/config/locales/ | ||
RUN bash /usr/src/app/config/locales/combine.sh | ||
|
||
|
||
FROM iabsis/hcw-backend:${HCW_BACKEND_VERSION} | ||
FROM init-layer | ||
|
||
COPY --from=i18n-layer /usr/src/app/config/locales/*.json /usr/src/app/config/locales/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
ARG HCW_DOCTOR_VERSION | ||
FROM iabsis/hcw-doctor:${HCW_DOCTOR_VERSION} AS i18n-layer | ||
FROM iabsis/hcw-doctor:${HCW_DOCTOR_VERSION} AS init-layer | ||
|
||
FROM init-layer AS i18n-layer | ||
USER root | ||
RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/* | ||
COPY assets/* /usr/share/nginx/html/assets/i18n | ||
RUN bash /usr/share/nginx/html/assets/i18n/combine.sh | ||
|
||
|
||
FROM iabsis/hcw-doctor:${HCW_DOCTOR_VERSION} | ||
FROM init-layer | ||
|
||
COPY --from=i18n-layer /usr/share/nginx/html/assets/i18n/*.* /usr/share/nginx/html/assets/i18n/ | ||
COPY --from=i18n-layer /usr/share/nginx/html/assets/i18n/*.json /usr/share/nginx/html/assets/i18n/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
ARG HCW_PATIENT_VERSION | ||
FROM iabsis/hcw-patient:${HCW_PATIENT_VERSION} AS i18n-layer | ||
FROM iabsis/hcw-patient:${HCW_PATIENT_VERSION} AS init-layer | ||
|
||
FROM init-layer AS i18n-layer | ||
USER root | ||
RUN apt update && apt install -y jq && rm -rf /var/lib/apt/lists/* | ||
COPY assets/* /usr/share/nginx/html/assets/i18n | ||
RUN bash /usr/share/nginx/html/assets/i18n/combine.sh | ||
|
||
|
||
FROM iabsis/hcw-patient:${HCW_PATIENT_VERSION} | ||
|
||
FROM init-layer | ||
COPY --from=i18n-layer /usr/share/nginx/html/assets/i18n/*.json /usr/share/nginx/html/assets/i18n/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#!/bin/bash | ||
# This script will start docker services and copy initial i18n files for HCW Docker images. | ||
|
||
# copy file from docker service to the related i18n folder | ||
move_files() { | ||
local service=$1 | ||
local docker_path=$2 | ||
local tmp_folder="./${service}/assets/i18n-temp" | ||
local i18n_folder="./${service}/assets/i18n" | ||
rm -rf "${tmp_folder}" | ||
docker compose cp "${service}":"${docker_path}" "${tmp_folder}" | ||
echo "move ${tmp_folder}/template.json to ${i18n_folder}" | ||
mv "${tmp_folder}"/template.json "${i18n_folder}"/ | ||
for orig_file in "${tmp_folder}"/*.orig.json; do | ||
target_name=$(basename "$orig_file"|cut -d. -f1)".json" | ||
target_file=${i18n_folder}/$target_name | ||
echo "Move ${orig_file} to ${target_file}" | ||
mv "${orig_file}" "${target_file}" | ||
done | ||
rm -rf "${tmp_folder}" | ||
|
||
} | ||
|
||
docker compose up -d --build | ||
move_files "doctor" "/usr/share/nginx/html/assets/i18n/" | ||
move_files "admin" "/usr/share/nginx/html/assets/i18n/" | ||
move_files "patient" "/usr/share/nginx/html/assets/i18n/" | ||
move_files "backend" "/usr/src/app/config/locales/" |