mirror of
https://github.com/xzeldon/zeldon-site.git
synced 2025-07-16 01:34:36 +03:00
refactor: restructure
This commit is contained in:
14
config/Dockerfile
Normal file
14
config/Dockerfile
Normal 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
14
config/docker-compose.yml
Normal 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
10
config/nginx.conf
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user