Skip to content
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

feat: support docker nginx deploy #573

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions Dockerfile.nginx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM node:20-alpine AS build-env

WORKDIR /home/node/app

RUN chown -R node:node /home/node/app

USER node

COPY package*.json ./

COPY --chown=node:node . .
RUN yarn install
ENV NODE_ENV=production
# if you want to use your own meilisearch server, you can set the following env
# ENV REACT_APP_MEILI_SERVER_ADDRESS=http://meilisearch:7700
# ENV REACT_APP_MEILI_API_KEY=masterKey
RUN yarn build

FROM nginx
COPY --from=build-env /home/node/app/build/ /usr/share/nginx/html/
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,19 @@ docker build -t meilisearch-mini-dashboard .
docker run -it -e REACT_APP_MEILI_SERVER_ADDRESS=http://localhost:7700 -p 3000:3000 meilisearch-mini-dashboard
```

You can then access the mini-dashboard at `http://localhost:3000`.

## Docker with Nginx
nginx is also available in the Docker image. You can use it to serve the mini-dashboard.

```bash
docker build --build-arg REACT_APP_MEILI_SERVER_ADDRESS=http://meilisearch:7700 -t meilisearch-mini-dashboard-nginx . -f Dockerfile.nginx
docker run -p 8080:80 meilisearch-mini-dashboard-nginx
```

You can then access the mini-dashboard at `http://localhost:8080`.


## Contributing

If you want to contribute to this project, please make sure to read [the contributing guidelines](./CONTRIBUTING.md)
Expand Down
Loading