second commit

This commit is contained in:
2026-05-09 00:45:15 +03:00
parent 51a44ef13d
commit 0573027611
4 changed files with 66 additions and 0 deletions

17
.dockerignore Normal file
View File

@@ -0,0 +1,17 @@
node_modules
dist
.git
.gitignore
.claude
.planning
.env
.env.*
*.log
npm-debug.log*
.DS_Store
.vscode
.idea
Dockerfile
.dockerignore
docker-compose.yml
README.md

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
# syntax=docker/dockerfile:1.7
FROM node:20-alpine AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
FROM node:20-alpine AS build
WORKDIR /app
COPY --from=deps /app/node_modules ./node_modules
COPY . .
RUN npm run build
FROM nginx:1.27-alpine AS runtime
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

10
docker-compose.yml Normal file
View File

@@ -0,0 +1,10 @@
services:
frontend:
build:
context: .
dockerfile: Dockerfile
image: elcsa-frontend:latest
container_name: elcsa-frontend
ports:
- "3000:80"
restart: unless-stopped

21
nginx.conf Normal file
View File

@@ -0,0 +1,21 @@
server {
listen 80;
server_name _;
root /usr/share/nginx/html;
index index.html;
gzip on;
gzip_comp_level 6;
gzip_min_length 1024;
gzip_types text/plain text/css application/javascript application/json image/svg+xml;
location /assets/ {
expires 1y;
add_header Cache-Control "public, immutable";
try_files $uri =404;
}
location / {
try_files $uri $uri/ /index.html;
}
}