Skip to content

Commit

Permalink
updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nitin27may committed Mar 2, 2024
1 parent 80acd71 commit bd690e2
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 43 deletions.
36 changes: 5 additions & 31 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Run `npm run dev-server` to start the api server in development mode (using node
### Dockerfile Production

```dockerfile
FROM node:12.8-alpine
FROM node:21-alpine

# Copy dependency definitions
COPY package.json package-lock.json ./

# disabling ssl for npm for Dev or if you are behind proxy
RUN npm set strict-ssl false

## installing and Storing node modules on a separate layer will
## prevent unnecessary npm installs at each build

## installing and Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN npm i && mkdir /app && mv ./node_modules ./app

# Change directory so that our commands run inside this new directory
Expand All @@ -29,34 +29,8 @@ COPY . /app/
# Expose the port the app runs in
EXPOSE 3000

# Serve the app
CMD ["npm", "start"]

```
### Dockerfile Development
```dockerfile
# Create image based off of the official 12.8-alpine
FROM node:14

# disabling ssl for npm for Dev or if you are behind proxy
RUN npm set strict-ssl false

# Change directory so that our commands run inside this new directory
WORKDIR /api

# Copy dependency definitions
COPY package.json ./

## installing node modules
RUN npm i


COPY . .

# Expose the port the app runs in
EXPOSE 3000
USER node

# Serve the app
CMD [ "npm", "run", "dev-server" ]

CMD ["npm", "start"]
```
35 changes: 25 additions & 10 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,16 +44,16 @@ Describes which version .

```dockerfile
# Create image based off of the official Node 10 image
FROM node:16-alpine as builder
FROM node:21-alpine as builder

# Copy dependency definitions
COPY package.json package-lock.json ./

# disabling ssl for npm for Dev or if you are behind proxy
RUN npm set strict-ssl false
RUN npm install -g [email protected]

## installing and Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN npm ci && mkdir /app && mv ./node_modules ./app
## --legacy-peer-deps as ngx-bootstrap still depends on Angular 14
RUN npm i --legacy-peer-deps && mkdir /app && mv ./node_modules ./app

# Change directory so that our commands run inside this new directory
WORKDIR /app
Expand All @@ -64,22 +64,37 @@ COPY . /app/
# Build server side bundles
RUN npm run build:ssr

FROM node:14.5-alpine
FROM node:21-alpine
## From 'builder' copy published folder
COPY --from=builder /app/dist/frontend /app
COPY --from=builder /app /app

WORKDIR /app
# Expose the port the app runs in
EXPOSE 4000

CMD ["node", "server/main.js"]
USER node

CMD ["node", "dist/frontend/server/main.js"]

```
### Dockerfile Development mode
```dockerfile

# Create image based off of the official 12.8-alpine
FROM node:14
FROM node:21-alpine

#RUN echo "nameserver 8.8.8.8" | tee /etc/resolv.conf > /dev/null
WORKDIR /app

## Further help
# Copy dependency definitions
COPY package*.json ./

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
## installing and Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN npm i --legacy-peer-deps --unsafe-perm=true --allow-root

RUN npm install -g @angular/cli

COPY . /app/

EXPOSE 4200 49153
```
3 changes: 2 additions & 1 deletion loadbalancer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@
FROM nginx
# Copy the configuration file from the current directory and paste
# it inside the container to use it as Nginx's default config.

COPY nginx.conf /etc/nginx/nginx.conf
# Port 8080 of the container will be exposed and then mapped to port
# 8080 of our host machine via Compose. This way we'll be able to access the server via localhost:8080 on our host.
EXPOSE 8000

# Start Nginx when the container has provisioned.
CMD ["nginx", "-g", "daemon off;"]
CMD ["nginx", "-g", "daemon off;"\]](README.md)

```
### NGINX config
Expand Down
1 change: 0 additions & 1 deletion mongo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
We have used mongo db image and for data seed used `docker-entrypoint-initdb.d` and shell script is in file `init-mongo.sh`



Also, we have used mongo import to seed data :


Expand Down

0 comments on commit bd690e2

Please sign in to comment.