Skip to content

Commit

Permalink
chore: revert frontend docker/nginx files
Browse files Browse the repository at this point in the history
Signed-off-by: Prashant Shahi <prashant@signoz.io>
  • Loading branch information
prashant-shahi committed Jan 27, 2025
1 parent 08c7712 commit ad57e43
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
.vscode
.git
18 changes: 18 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM nginx:1.26-alpine

# Add Maintainer Info
LABEL maintainer="signoz"

# Set working directory
WORKDIR /frontend

# Remove default nginx index page
RUN rm -rf /usr/share/nginx/html/*

# Copy custom nginx config and static files
COPY conf/default.conf /etc/nginx/conf.d/default.conf
COPY build /usr/share/nginx/html

EXPOSE 3301

ENTRYPOINT ["nginx", "-g", "daemon off;"]
33 changes: 33 additions & 0 deletions frontend/conf/default.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
server {
listen 3301;
server_name _;

gzip on;
gzip_static on;
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
gzip_proxied any;
gzip_vary on;
gzip_comp_level 6;
gzip_buffers 16 8k;
gzip_http_version 1.1;

# to handle uri issue 414 from nginx
client_max_body_size 24M;
large_client_header_buffers 8 128k;

location / {
root /usr/share/nginx/html;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
location = /api {
proxy_pass http://signoz-query-service:8080/api;
}

# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
7 changes: 7 additions & 0 deletions frontend/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3.9"
services:
web:
build: .
image: signoz/frontend:latest
ports:
- "3301:3301"

0 comments on commit ad57e43

Please sign in to comment.