-
-
Notifications
You must be signed in to change notification settings - Fork 58
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(docker): try to get docker prefix
- Loading branch information
Showing
4 changed files
with
54 additions
and
0 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
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,34 @@ | ||
<VirtualHost *:80> | ||
DocumentRoot /deploy/server/www | ||
ErrorLog /deploy/server/logs/apache/error.log | ||
CustomLog /deploy/server/logs/apache/access.log combined | ||
|
||
Alias TRAME_URL_PREFIX /deploy/server/www/ | ||
|
||
<Directory /deploy/server/www> | ||
Options Indexes FollowSymLinks | ||
AllowOverride None | ||
Require all granted | ||
</Directory> | ||
|
||
# Set CORS headers | ||
Header set Access-Control-Allow-Origin "*" | ||
|
||
# Handle launcher forwarding | ||
ProxyPass TRAME_URL_PREFIX/launcher http://localhost:9000/paraview | ||
ProxyPassReverse TRAME_URL_PREFIX/launcher http://localhost:9000/paraview | ||
|
||
# Handle paraview forwarding | ||
ProxyPass TRAME_URL_PREFIX/paraview http://localhost:9000/paraview | ||
ProxyPassReverse TRAME_URL_PREFIX/paraview http://localhost:9000/paraview | ||
|
||
# Handle WebSocket forwarding | ||
RewriteEngine On | ||
RewriteMap session-to-port txt:/opt/trame/proxy-mapping.txt | ||
RewriteCond %{QUERY_STRING} ^sessionId=(.*)&path=(.*)$ [NC] | ||
RewriteRule ^TRAME_URL_PREFIX/proxy.*$ ws://${session-to-port:%1}/%2 [P] | ||
|
||
# Handle API forwarding | ||
RewriteRule ^TRAME_URL_PREFIX/api/(.*)/(.*)$ http://${session-to-port:$1}/$2 [P,L] | ||
|
||
</VirtualHost> |
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
52ecb18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now when I run my server with my trame/paraview app the error "no module named 'trame'" comes. What do I have to do to adapt to these changes?
52ecb18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change listed should not affect anything ParaView or not. So the real question is: what is your setup/config that leads to the fact that the venv is not loaded within pvpython.
52ecb18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was working fine and after the image commit it stopped running my server. I am running a docker server with the singlefile config. The only change I had to make with the new commit it was to change permissions for /tmp folder because of an error on "apt update": RUN chmod 1777 /tmp on Dockerfile
52ecb18
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, that's interesting, and thanks for sharing your findings. I'm not sure what the cause could be. Maybe it's related to an update in the Ubuntu base layer.
Otherwise, I'm not sure why you have those 2 last args. Normally if you set PV_VENV environment variable and you have the following import
import paraview.web.venv
as first line in your app.py, it should just work.