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

De-root nginx (and grpc-proxy) #2847

Merged

Conversation

JamesXNelson
Copy link
Member

Also adds /ide routing in nginx, so we always serve index.html, but preserve full url so js can read the /ide/path.

docker/web/build.gradle Show resolved Hide resolved
USER 0

# We want to install sudo, and start the sudo service (update policy-rc.d to exit 0, instead of 101)
RUN ls -la /usr/sbin/policy-rc.d ; \
Copy link
Member

Choose a reason for hiding this comment

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

convention is to prefix any multi-line RUN commands with set -eux to avoid surprises when one command fails, then the &&s aren't required. Alternatively, move contents into a .sh file, and start that with set -eux, invoke that directly (though that involves copying it first, etc)

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@JamesXNelson
Copy link
Member Author

For documentation, I'm thinking to just update anywhere we might reference nginx w/ nginx-noroot.... however, I'm not sure if that's even needed at all, since users are likely consuming the completed web image and won't care much about base images. Changing the port from 80 to 8080 tho... that is likely to break examples and consumers of docker images, so... not 100% sure how much docs will be needed.

--server_http_tls_port="${PROXY_TLS_PORT}" \
--server_tls_cert_file="$TLS_CRT" \
--server_tls_key_file="$TLS_KEY" \
--server_tls_client_ca_files="$TLS_CA,/etc/ssl/certs/ca-certificates.crt,/var/run/secrets/kubernetes.io/serviceaccount/ca.crt" \
Copy link
Member

Choose a reason for hiding this comment

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

Is this kubernetes path going to break anybody who may want to do TLS on non-kube?

Copy link
Member Author

Choose a reason for hiding this comment

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

Nope; I don't think so at least. It's just a list of places where there are CA files.

If you want, I can build the list and check if the files are readable first, that way it will work in kube but won't risk breaking someone w/o that ca cert.

Copy link
Member Author

Choose a reason for hiding this comment

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

I checked if they exist before adding to the flag, so there's no way it can break non-kube users now.

@margaretkennedy
Copy link
Contributor

Comment on lines 24 to 25
#expires -1;
#add_header Cache-Control 'must-revalidate, max-age=0';
Copy link
Member

Choose a reason for hiding this comment

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

Don't think these should be commented out?

Copy link
Member Author

Choose a reason for hiding this comment

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

Seems to work w/ these uncommented out.

Copy link
Member Author

Choose a reason for hiding this comment

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

Even w/ these uncommented tho, a page using this feature like https://jxn-test-changes.demo.deephaven.app/ide/notebook/03%20Kafka%20Stream%20vs%20Append.md still gives me 304 cached status...

docker/web/build.gradle Show resolved Hide resolved
@JamesXNelson
Copy link
Member Author

Ok, I think from the comments I've received, everything that is done is everything that is needed.

@JamesXNelson
Copy link
Member Author

Nm... I see now the examples for the images are in the deephaven-core repo, and will need updates. One more commit coming.

@JamesXNelson
Copy link
Member Author

ok, all pushed, conflicts resolved, should be g2g

@niloc132
Copy link
Member

niloc132 commented Oct 3, 2022

Be sure to hit the "Re-request review" button for each reviewer when it is ready to go.

Copy link
Member

@devinrsmith devinrsmith left a comment

Choose a reason for hiding this comment

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

Everything seems to run fine for me. That said, it's tough for me to say whether there will be unintended fallout wrt the web image. Good news is we are moving away from the web image as a construct.

@JamesXNelson JamesXNelson merged commit a3bc9dc into deephaven:main Oct 3, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants