Skip to content

Commit

Permalink
Docker support with nginx
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielAzulayy committed Aug 3, 2022
1 parent 5eb143a commit 43b25e8
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules/
dist/
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:16 AS frontend

WORKDIR /frontend
COPY package*.json /frontend
RUN npm install

COPY . /frontend
RUN npm run dev

FROM nginx:latest
COPY --from=frontend /frontend/dist/ /usr/share/nginx/html
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,13 @@ Open the index HTML file and explore the source code.
- Either run `npm run hot` and open `http://localhost:8080` to see a hot-reloading copy of the generated files
- Or run `npm run watch` (rebuilds on file changes) or `npm run production` and open `index.html` in from the dist folder.

### Building with Docker
- Clone the repository `git clone https://github.com/zuramai/mazer`
- Make sure you have Docker installed and run:
- `docker build -t mazer-frontend .`
- `docker run -it -d -p 8080:80 --name mazer mazer-frontend`
- Open `http://localhost:8080`

## Community Mazer-based open sources

- [CodeIgniter 4](https://github.com/irsyadulibad/mazer-codeigniter) by [@irsyadulibad](https://github.com/irsyadulibad)
Expand Down

0 comments on commit 43b25e8

Please sign in to comment.