add docker
This commit is contained in:
parent
5e6bdacdbb
commit
618fc16ed8
|
@ -0,0 +1,2 @@
|
|||
node_modules
|
||||
dist
|
|
@ -0,0 +1,17 @@
|
|||
FROM node:20-slim as build
|
||||
|
||||
WORKDIR /opt
|
||||
|
||||
COPY ./package.json /opt/package.json
|
||||
COPY ./package-lock.json /opt/package-lock.json
|
||||
|
||||
RUN npm ci
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:1.24-alpine-slim
|
||||
|
||||
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=build /opt/dist /usr/share/nginx/html
|
|
@ -0,0 +1,12 @@
|
|||
version: "3"
|
||||
|
||||
services:
|
||||
zeldon-site:
|
||||
image: zeldon-site:latest
|
||||
container_name: zeldon-site
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- 3123:80
|
||||
restart: unless-stopped
|
|
@ -0,0 +1,10 @@
|
|||
server {
|
||||
listen 80;
|
||||
|
||||
# path to files for serve
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue