-
-
Notifications
You must be signed in to change notification settings - Fork 94
Add Docker Compose setup for local development #383
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
Open
Eng-Omar-Hussein
wants to merge
18
commits into
jenkins-infra:main
Choose a base branch
from
Eng-Omar-Hussein:compose
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+162
−84
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
a570523
feat: add Docker Compose setup for local development
Eng-Omar-Hussein 93e051b
Modify command for stories_webapp service
Eng-Omar-Hussein e453497
Refactor docker-compose.yml structure
Eng-Omar-Hussein 8725cd2
Modify docker-compose.yml for workspace variable usage
Eng-Omar-Hussein 9661f36
refactor: streamline Jenkinsfile stages and improve deployment logic
Eng-Omar-Hussein 39b0ee9
Refactor Jenkinsfile
Eng-Omar-Hussein eb3190c
Apply suggestions from code review
Eng-Omar-Hussein 651f976
refactor: update environment variable handling in Jenkinsfile and doc…
Eng-Omar-Hussein 9720cbb
docs: update Docker Compose usage instructions for user ID requirement
Eng-Omar-Hussein eaa6216
Merge branch 'jenkins-infra:main' into compose
Eng-Omar-Hussein 96523d5
Merge branch 'compose' of github.com:Eng-Omar-Hussein/stories into co…
Eng-Omar-Hussein 5eba4ae
Merge branch 'compose' of github.com:Eng-Omar-Hussein/stories into co…
Eng-Omar-Hussein d44b338
refactor: streamline Jenkinsfile and enhance Docker Compose setup for…
Eng-Omar-Hussein 1ab18cd
refactor: simplify directory creation and permissions in Docker Compo…
Eng-Omar-Hussein f4672ae
refactor: update working directory in .env and optimize Docker Compos…
Eng-Omar-Hussein 7745586
Merge branch 'main' into compose
Eng-Omar-Hussein 7b4bc81
fix: update jenkins agent image version
Eng-Omar-Hussein 7993560
Merge branch 'main' into compose
krisstern 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| APP_WORKING_DIR = "/home/jenkins/agent" | ||
| NODE_ENV = 'production' | ||
| TZ = "UTC" | ||
| # // Amount of available vCPUs, to avoid OOM - https://www.gatsbyjs.com/docs/how-to/performance/resolving-out-of-memory-issues/#try-reducing-the-number-of-cores | ||
| # // https://github.com/jenkins-infra/jenkins-infra/tree/production/hieradata/clients/controller.ci.jenkins.io.yaml#L327 | ||
| GATSBY_CPU_COUNT = "4" | ||
| GATSBY_TELEMETRY_DISABLED = "1" | ||
| NODE_OPTIONS = "--no-warnings" | ||
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
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 |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| services: | ||
| stories_webapp: | ||
| # TODO: track version with updatecli - ref. https://github.com/jenkins-infra/jenkins-infra/blob/efe90908529525bb3c9e61c2eb920ada3b968f1a/updatecli/updatecli.d/jenkinscontroller-tools-maven.yaml#L17-L22 | ||
| image: jenkinsciinfra/jenkins-agent-ubuntu-22.04:2.102.0 | ||
| ports: | ||
| - "8000:8000" | ||
|
|
||
| environment: | ||
| # Can pass the "GATSBY_CPU_COUNT" from your shell straight through to your containers, if it is set and not empty, otherwise the default value will be used to avoid OOM issues | ||
| GATSBY_CPU_COUNT: ${GATSBY_CPU_COUNT:-physical_cores} | ||
| CHOKIDAR_USEPOLLING: "true" | ||
| NODE_ENV: development | ||
| APP_WORKING_DIR: $APP_WORKING_DIR | ||
|
|
||
| volumes: | ||
| - .:$APP_WORKING_DIR/workspace | ||
| - ./src:$APP_WORKING_DIR/src | ||
| - stories_node_modules:/tmp/node_modules | ||
|
|
||
| working_dir: $APP_WORKING_DIR | ||
| user: jenkins | ||
| entrypoint: [] | ||
| command: > | ||
| sh -c " | ||
| ln -s /tmp/node_modules ${APP_WORKING_DIR}/node_modules || true && | ||
| cp -r ${APP_WORKING_DIR}/workspace/. . || true && | ||
| node --version && | ||
| npm --version && | ||
| npm ci && | ||
| npm run develop -- -H 0.0.0.0 -p 8000 | ||
| " | ||
|
|
||
| volumes: | ||
| stories_node_modules: |
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.