refactor: restructure

This commit is contained in:
2025-01-29 04:55:18 +03:00
parent 4a6aa94e39
commit dc3462a864
14 changed files with 148 additions and 128 deletions

14
config/Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM node:24-slim as build
WORKDIR /opt
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:1.24-alpine-slim
COPY config/nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /opt/dist /usr/share/nginx/html

14
config/docker-compose.yml Normal file
View File

@ -0,0 +1,14 @@
version: "3"
services:
zeldon-site:
image: zeldon-site:latest
container_name: zeldon-site
build:
context: .
dockerfile: config/Dockerfile
ports:
- "3123:80"
restart: unless-stopped
volumes:
- ./config/nginx.conf:/etc/nginx/conf.d/default.conf:ro

10
config/nginx.conf Normal file
View File

@ -0,0 +1,10 @@
server {
listen 80;
# path to files for serve
root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html;
}
}