Skip to content
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
50 changes: 50 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Dependencies
node_modules
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*

# Build outputs
dist
dist-ssr
*.local

# IDE
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

# Testing
coverage
.nyc_output
cypress/videos
cypress/screenshots

# Environment
.env
.env.local
.env.*.local

# Git
.git
.gitignore
.gitattributes

# Documentation
*.md
!README.md

# CI/CD
.github

# Misc
.eslintcache
.prettierignore
*.log
67 changes: 67 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 - 2025 Contributors to EVerest

# Build stage
FROM node:22-alpine AS builder

# Set working directory
WORKDIR /app

# Copy package files
COPY package.json package-lock.json* ./

# Install dependencies
RUN npm ci

# Copy source code
COPY . .

# Build the application
RUN npm run build

# Production stage
FROM nginx:alpine

# Copy nginx configuration
COPY <<EOF /etc/nginx/conf.d/default.conf
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;

# Enable gzip compression
gzip on;
gzip_vary on;
gzip_min_length 1024;
gzip_types text/plain text/css text/xml text/javascript application/x-javascript application/xml+rss application/javascript application/json;

# Serve static files
location / {
try_files \$uri \$uri/ /index.html;
add_header Cache-Control "no-cache";
}

# Cache static assets
location /assets {
expires 1y;
add_header Cache-Control "public, immutable";
}

# Health check endpoint
location /health {
access_log off;
return 200 "healthy\n";
add_header Content-Type text/plain;
}
}
EOF

# Copy built files from builder stage
COPY --from=builder /app/dist /usr/share/nginx/html

# Expose port
EXPOSE 80

# Start nginx
CMD ["nginx", "-g", "daemon off;"]
45 changes: 45 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright 2020 - 2025 Contributors to EVerest

services:
everest-admin-panel:
image: ghcr.io/everest/everest-admin-panel
build:
context: .
dockerfile: Dockerfile
container_name: everest-admin-panel
ports:
- "8080:80"
restart: unless-stopped
environment:
- NODE_ENV=production
healthcheck:
test: ["CMD", "wget", "--quiet", "--tries=1", "--spider", "http://localhost/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 40s
networks:
- everest-network

# Development service (optional)
everest-admin-panel-dev:
image: node:22-alpine
container_name: everest-admin-panel-dev
working_dir: /app
ports:
- "8080:8080"
volumes:
- .:/app
- /app/node_modules
command: sh -c "npm install && npm run dev"
environment:
- NODE_ENV=development
networks:
- everest-network
profiles:
- dev

networks:
everest-network:
driver: bridge