Skip to content

Commit

Permalink
doc(container/nginx): readme
Browse files Browse the repository at this point in the history
  • Loading branch information
alimd committed Sep 27, 2022
1 parent c25d192 commit 320e10a
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions packages/container/nginx/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,33 @@ High performance, optimized NGINX for server web applications and api proxy with
## Cloud Native Application Best Practices

The right way of using `@alwatr/nginx` is behind kubernetes ingress or simple edge reverse-proxy, then don't config edge stuff like gzip compression, ssl, etc or even config domain or multi websites!

## Usage

### Pull image from the command line

```sh
docker pull ghcr.io/alimd/nginx:1
```

### Use as base image in Dockerfile

```Dockerfile
FROM ghcr.io/alimd/nginx:1
```

#### PWA Dockerfile Sample

```Dockerfile
ARG NODE_VERSION=lts
FROM node:${NODE_VERSION} as build-deps
WORKDIR /app
COPY package.json *.lock .
RUN yarn install --frozen-lockfile --non-interactive && yarn cache clean
COPY . .
RUN yarn build

ARG ALWATR_NGINX_VERSION=1
FROM ghcr.io/alimd/nginx:${ALWATR_NGINX_VERSION}
COPY --from=build-deps /app/dist/ .
```

0 comments on commit 320e10a

Please sign in to comment.