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

Fix Docker and upgrade Node #415

Merged
merged 35 commits into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
3c64705
Fix Yarn and Docker
gabalafou Sep 4, 2024
7e66225
The actual changes needed
gabalafou Sep 4, 2024
3bf256a
revert yarn version change
gabalafou Sep 5, 2024
a2b6ca2
add comment to environment_dev.yml
gabalafou Sep 5, 2024
5afbab2
revert changes to yarn.lock
gabalafou Sep 5, 2024
b28e273
add --immutable flag to yarn install in Dockerfile
gabalafou Sep 5, 2024
53a4f3e
leave quotes
gabalafou Sep 5, 2024
ebd1be5
update GitHub workflows
gabalafou Sep 5, 2024
dc866d2
update README
gabalafou Sep 5, 2024
596ebdd
Merge branch 'main' into main
gabalafou Sep 5, 2024
1aa51c0
Update environment_dev.yml
gabalafou Sep 5, 2024
0e6ee65
Update Dockerfile
gabalafou Sep 5, 2024
2b1c742
Update Dockerfile
gabalafou Sep 5, 2024
ab76abb
Move corepack enable step up (to hopefully fix failing GitHub CI jobs)
gabalafou Sep 5, 2024
0924268
Update README.md
gabalafou Sep 6, 2024
08f986c
Update .github/workflows/release.yml
gabalafou Sep 6, 2024
0634f9d
Update .github/workflows/build.yml
gabalafou Sep 6, 2024
d8498ea
upgrade node
gabalafou Sep 6, 2024
7fcee93
do not test node 18 (drop support for it)
gabalafou Sep 6, 2024
565a4c3
put alpine back
gabalafou Sep 6, 2024
d40a7cc
make node more specific
gabalafou Sep 6, 2024
9a400b8
Merge remote-tracking branch 'upstream/main' into fix-docker
gabalafou Sep 9, 2024
4aea59e
move corepack enable command to correct place
gabalafou Sep 9, 2024
ef25374
correct list numbering in readme
gabalafou Sep 9, 2024
8ce35b8
Merge branch 'main' into main
gabalafou Sep 13, 2024
8687fd7
Apply suggestions from code review
gabalafou Sep 23, 2024
d93e3a5
Merge branch 'main' into fix-docker
gabalafou Sep 23, 2024
d74bd4d
Update environment_dev.yml
gabalafou Sep 23, 2024
27e15ca
Update Dockerfile
gabalafou Sep 23, 2024
f83e2f9
Update Dockerfile
gabalafou Sep 23, 2024
a2dd673
Update environment_dev.yml
gabalafou Sep 23, 2024
211eafc
Update Dockerfile
gabalafou Sep 23, 2024
d2841b3
correct docker image
gabalafou Sep 23, 2024
daa6589
Update environment_dev.yml
gabalafou Sep 23, 2024
bf85545
Update README.md
gabalafou Sep 23, 2024
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
925 changes: 0 additions & 925 deletions .yarn/releases/yarn-4.4.0.cjs
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not needed for Yarn classic (v1)

Copy link
Contributor Author

@gabalafou gabalafou Sep 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using Corepack now, not yarnPath, so this file should be deleted

This file was deleted.

3 changes: 0 additions & 3 deletions .yarnrc.yml
trallard marked this conversation as resolved.
Show resolved Hide resolved

This file was deleted.

2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ RUN --mount=type=cache,target=/root/.yarn YARN_CACHE_FOLDER=/root/.yarn \

EXPOSE 8000

CMD [ "yarn", "webpack-dev-server", "--port", "8000" ]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This command doesn't actually exist anymore but it was never updated. Probably because the image is never run with this default command but rather a command override is supplied by Docker Compose.

CMD [ "yarn", "run", "start:ui" ]
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ services:

conda-store-ui:
build: .
command: "yarn run start:ui --port 8000 --history-api-fallback"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't actually pass these options this way.

command: yarn run start:ui
profiles:
- local-dev
ports:
Expand All @@ -91,7 +91,8 @@ services:
condition: service_healthy
platform: linux/amd64
volumes:
- .:/usr/src/app
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the real source of the "node_modules state file not found" error, not the Yarn version

- ./src:/usr/src/app/src
- ./style:/usr/src/app/style
Comment on lines +94 to +95
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are really the only folders that can be watched for hot-reloading. Mounting everything was causing the .env file (which gets copied in the build step, see the Dockerfile) to go missing.

healthcheck:
test:
["CMD", "curl", "--fail", "http://localhost:8000"]
Expand Down
3 changes: 1 addition & 2 deletions environment_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ channels:
- conda-forge
dependencies:
- python=3.10
- yarn>=4.4.0
- nodejs>=18.0
- nodejs=18.18 # do not install Yarn separately, will get Yarn via Corepack
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- pytest
- pip
- pip:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,5 +143,5 @@
"engines": {
"node": ">=18.0.0"
},
"packageManager": "yarn@4.4.0"
"packageManager": "yarn@1.22.19"
}
Loading
Loading