mirror of
https://github.com/KevinMidboe/hivemonitor.git
synced 2025-10-29 01:20:25 +00:00
Dockerfile and nginx conf file for serving static built files
This commit is contained in:
19
Dockerfile
Normal file
19
Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
FROM node:current-alpine3.17 as builder
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package*.json .
|
||||
COPY *config* .
|
||||
COPY .env .
|
||||
COPY src/ src
|
||||
COPY static/ static
|
||||
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder /app/build .
|
||||
COPY ./nginx.conf /etc/nginx/nginx.conf
|
||||
22
nginx.conf
Normal file
22
nginx.conf
Normal file
@@ -0,0 +1,22 @@
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
include mime.types;
|
||||
sendfile on;
|
||||
|
||||
server {
|
||||
listen 8080;
|
||||
listen [::]:8080;
|
||||
|
||||
# resolver 127.0.0.11;
|
||||
autoindex off;
|
||||
|
||||
server_name _;
|
||||
server_tokens off;
|
||||
|
||||
root /app/;
|
||||
gzip_static on;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user