-
Notifications
You must be signed in to change notification settings - Fork 1
#VFB-236 - Use v3 cache server and build backend only if flag set to true #220
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
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
2810d66
#VB-236 - add conditional backend build option in Dockerfile and upda…
jrmartin 8693391
chore: remove default value for BUILD_BACKEND in Dockerfile
jrmartin 2f45e3d
#VFB-236 - add conditional backend launch option in Docker entrypoint…
jrmartin 8187c6f
Update applications/virtual-fly-brain/frontend/vite.config.js
jrmartin 954e85d
feat: add conditional cron service start in Docker entrypoint script
jrmartin 78039f0
Merge branch 'feature/VFB-236' of github.com:MetaCell/virtual-fly-bra…
jrmartin 7367bfa
Merge remote-tracking branch 'origin/development' into feature/VFB-236
jrmartin b347a29
#VFB-236 : implement conditional cron job setup in Dockerfile based o…
jrmartin 5b34926
#VFB-236 implement conditional backend launch in Docker entrypoint sc…
jrmartin e146bf2
chore: remove default value for BUILD_BACKEND in Dockerfile to enhanc…
jrmartin fb3665d
chore: update Dockerfile to set up cache cleanup cron job and streaml…
jrmartin c3947af
chore: add exec command to start main application in Docker entrypoin…
jrmartin 4b114af
#VFB-236 - Refactor Docker entrypoint script for conditional backend …
jrmartin 7f641ad
#VFB-236 add BUILD_BACKEND environment variable to deployment configu…
jrmartin 30c97ca
#VFRB-236 - enhance Docker entrypoint script for conditional backend …
jrmartin 7d7f2b8
#VFB-236 - enhance Dockerfile and entrypoint script for BUILD_BACKEND…
jrmartin 487b77d
#VFB-236 - add exec command to start main application after condition…
jrmartin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or 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
19 changes: 16 additions & 3 deletions
19
applications/virtual-fly-brain/backend/docker-entrypoint.sh
This file contains hidden or 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 |
|---|---|---|
| @@ -1,11 +1,24 @@ | ||
| #!/bin/bash | ||
| set -e | ||
|
|
||
| # Start cron service in the background | ||
| service cron start | ||
| echo "BUILD_BACKEND=$BUILD_BACKEND" | ||
| env | sort | grep BUILD | ||
|
|
||
| # Start cron service in the background (only if backend is enabled) | ||
| if [ "$BUILD_BACKEND" != "false" ]; then | ||
| service cron start | ||
| fi | ||
|
jrmartin marked this conversation as resolved.
|
||
|
|
||
| # Create cache directories with proper permissions | ||
| mkdir -p /tmp/vfb_cache/term_info /tmp/vfb_cache/queries | ||
| chmod 755 /tmp/vfb_cache /tmp/vfb_cache/term_info /tmp/vfb_cache/queries | ||
|
|
||
| # Conditional launch: if backend is disabled, serve frontend only | ||
| if [ "$BUILD_BACKEND" == "true" ]; then | ||
| exec gunicorn --log-level=info --preload --bind=0.0.0.0:8080 --timeout=240 --graceful-timeout=30 --keep-alive=5 virtual_fly_brain.__main__:app | ||
| else | ||
| exec serve /usr/src/app/virtual_fly_brain/www --single --listen 8080 | ||
| fi | ||
|
|
||
| # Start the main application | ||
| exec "$@" | ||
| exec "$@" | ||
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.