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

Update dega-studio build to include latest dependencies #925

Merged
merged 4 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,10 @@ Once the application is up and running you should be able to access it using the

- Create config file with name config (and extension .env, .yml, .json) in `server/`, `api/` and `templates/` add config variables (for eg see config.env.example in each folder)
- Create a `.env` file inside companion folder in root for companion config variables (for eg see .env.example file in companion folder)
git fetch upstream
git fetch upstream
- to add default env files automatically run `bash build.sh`

## Development Notes
- If there are updates to npm dependencies for `dega-studio`, run `bash build-nocache.sh` from the project root.
- If the script fails to update dependencies, enter the container and manually run `npm install --legacy-peer-deps`.

8 changes: 8 additions & 0 deletions build-nocache.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

# Create a unique cache bust value
CACHEBUST=$(date +%s)

# Pass the cache bust value as a build argument
docker-compose build --no-cache --build-arg CACHEBUST=$CACHEBUST dega-studio
docker-compose up
3 changes: 3 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -461,6 +461,9 @@ services:
build:
context: ./studio
dockerfile: Dockerfile
no_cache: true
args:
- CACHEBUST
environment:
- PUBLIC_URL=http://127.0.0.1:4455/.factly/dega/studio
- REACT_APP_KAVACH_PUBLIC_URL=http://127.0.0.1:4455/.factly/kavach/web
Expand Down
2 changes: 2 additions & 0 deletions studio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
FROM node:16-alpine

# set working directory
ARG CACHEBUST=100

WORKDIR /app

# install app dependencies
Expand Down
Loading