-
Notifications
You must be signed in to change notification settings - Fork 13
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
Devops #1732
Open
prasad-takale-eminds
wants to merge
1
commit into
develop-1.1.0
Choose a base branch
from
devops
base: develop-1.1.0
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.
Open
Devops #1732
Changes from all commits
Commits
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Ignore node_modules to avoid copying them | ||
**/node_modules | ||
cypress | ||
# Ignore any log files | ||
*.log | ||
|
||
# Ignore environment variables | ||
.env | ||
|
||
# Ignore Docker-related files | ||
Dockerfile | ||
.dockerignore | ||
|
||
# Ignore test directories | ||
test | ||
tests | ||
__tests__ | ||
__mocks__ | ||
|
||
# Ignore documentation | ||
docs | ||
*.md | ||
|
||
# Ignore build output directories | ||
dist | ||
build | ||
public | ||
|
||
# Ignore system files | ||
.DS_Store | ||
Thumbs.db | ||
|
||
# Ignore IDE and editor configuration files | ||
.vscode | ||
.idea | ||
*.iml | ||
|
||
# Ignore yarn cache and lock files that aren't needed | ||
.yarn/* | ||
!.yarn/releases | ||
!.yarn/plugins | ||
!.yarn/sdks | ||
!.yarn/versions | ||
yarn-error.log | ||
**/Jenkinsfile |
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,74 @@ | ||
# Dockerfile for Monorepo Applications | ||
|
||
This repository contains a Dockerfile designed to build and run different applications from a monorepo. The build process uses a build argument to specify which application to build and run. | ||
|
||
## How to Use | ||
|
||
### Build the Docker Image | ||
|
||
To build the Docker image for a specific application, use the `--build-arg` option to pass the `BUILD_TARGET` argument. Replace `<app-name>` with the name of the application you want to build. | ||
|
||
```sh | ||
docker build --build-arg BUILD_TARGET=<app-name> -t <image-name> . | ||
``` | ||
|
||
#### Example | ||
|
||
To build the Docker image for the `retail` application: | ||
|
||
```sh | ||
docker build --build-arg BUILD_TARGET=retail -t retail-app . | ||
``` | ||
|
||
### Run the Docker Container | ||
|
||
After building the Docker image, you can run the Docker container. Use the `-p` option to map the container's port to your host's port. | ||
|
||
```sh | ||
docker run -p <host-port>:3000 <image-name> | ||
``` | ||
|
||
#### Example | ||
|
||
To run the Docker container for the `retail` application: | ||
|
||
```sh | ||
docker run -p 3000:3000 retail-app | ||
``` | ||
|
||
### Available Applications | ||
|
||
Here are the available applications you can build and run: | ||
|
||
- `osm` | ||
- `common` | ||
- `dsep` | ||
- `odr` | ||
- `dhp` | ||
- `pg` | ||
- `dsnp` | ||
- `industry_4.0` | ||
- `regen-agri` | ||
- `taxi-bpp` | ||
- `retail` | ||
- `mobility-bap` | ||
- `tourismV1.1` | ||
- `tourism` | ||
- `OSC` | ||
- `dsnp-v2` | ||
- `odr-v2` | ||
|
||
### Example Workflow | ||
|
||
1. **Build the Docker image for the `retail` application:** | ||
```sh | ||
docker build --build-arg BUILD_TARGET=retail -t retail-app . | ||
``` | ||
|
||
2. **Run the Docker container for the `retail` application:** | ||
```sh | ||
docker run -p 3000:3000 retail-app | ||
``` | ||
|
||
Replace `retail` with any other application name from the list above to build and run different applications. | ||
|
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,26 @@ | ||
# Use the official Node.js 18 LTS image as the base image | ||
FROM node:18.18.2-alpine3.18 | ||
|
||
# Set the working directory in the container | ||
WORKDIR /app | ||
|
||
# Copy the package.json and yarn.lock files to the container | ||
COPY package.json yarn.lock ./ | ||
|
||
|
||
# Copy the rest of the application code to the container | ||
COPY . . | ||
|
||
# Install dependencies | ||
RUN yarn install | ||
|
||
# Build the application based on the provided build target | ||
ARG BUILD_TARGET | ||
RUN yarn build:${BUILD_TARGET} | ||
|
||
|
||
# Expose the port the application runs on (adjust if necessary) | ||
EXPOSE 3000 | ||
|
||
# Start the application | ||
CMD ["yarn", "workspace", "@beckn-ui/${BUILD_TARGET}", "start"] |
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.
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.
@prasad-takale-eminds older applications are removed from the migrated branch. Can you validate all the applications once ? Apps like dsnp and odr are removed