Skip to content

Commit

Permalink
fix env prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
Amy Chen authored and Amy Chen committed Nov 15, 2024
1 parent 6b81fdb commit 0a7b69d
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RUN yarn build
FROM nginx

ARG REACT_APP_VERSION_STRING
ENV REACT_APP_VERSION_STRING=$VITE_VERSION_STRING
ENV REACT_APP_VERSION_STRING=$REACT_APP_VERSION_STRING

COPY docker-entrypoint.sh /usr/bin/docker-entrypoint.sh
COPY --from=build-deps /opt/app/dist /usr/share/nginx/html
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ The Pain Management Summary can be deployed as static web resources on any HTTP
5. Modify the `clientId` in `public/launch-context.json` to match the unique client ID you registered with the EHR from which this app will be launched
6. NOTE: The launch context contains `"completeInTarget": true`. This is needed if you are running in an environment that initializes the app in a separate window (such as the public SMART sandbox). It can be safely removed in other cases.
7. If you've set up an analytics endpoint (see below), set the `analytics_endpoint` and `x_api_key` in `public/config.json`
8. If you'll be launching the app from an Epic EHR, modify `.env` to set `REACT_APP_SUPPORTED_QUERIES` to `true`
8. If you'll be launching the app from an Epic EHR, modify `.env` to set `REACT_APP_EPIC_SUPPORTED_QUERIES` to `true`
a. This modifies some queries based on Epic-specific requirements
9. Run `yarn build` to compile the code to static files in the `dist` folder
10. Deploy the output from the `dist` folder to a standard web server
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
args:
# set build arg from environment variable with same name
# add default to squelch warnings
VITE_VERSION_STRING: ${VITE_VERSION_STRING:-local}
REACT_APP_VERSION_STRING: ${REACT_APP_VERSION_STRING:-local}

ports:
# allow override of published port
Expand Down
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ write_env_to_json() {
local json_file="$1"

# only write environment variables containing "REACT_"
local json_contents="{$(printenv | grep VITE_ | sed 's/^\|$/"/g' | sed 's|=|":"|' | paste -sd, -)}"
local json_contents="{$(printenv | grep REACT_ | sed 's/^\|$/"/g' | sed 's|=|":"|' | paste -sd, -)}"
echo "$json_contents" > "$json_file"
}

Expand Down

0 comments on commit 0a7b69d

Please sign in to comment.