Added docker config
parent
ad56794b95
commit
1540527b9c
|
|
@ -0,0 +1,10 @@
|
||||||
|
node_modules
|
||||||
|
npm-debug.log
|
||||||
|
Dockerfile*
|
||||||
|
docker-compose*
|
||||||
|
.dockerignore
|
||||||
|
.git
|
||||||
|
.gitignore
|
||||||
|
README.md
|
||||||
|
LICENSE
|
||||||
|
.vscode
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
# build environment
|
||||||
|
FROM node:16-alpine as build
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY package.json ./
|
||||||
|
RUN ["npm", "install"]
|
||||||
|
COPY . .
|
||||||
|
RUN ["npm", "run", "build"]
|
||||||
|
|
||||||
|
# production environment
|
||||||
|
FROM nginx:stable-alpine
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
COPY ./nginx/default.conf /etc/nginx/conf.d/default.conf
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
@ -0,0 +1,15 @@
|
||||||
|
version: "3.8"
|
||||||
|
services:
|
||||||
|
web:
|
||||||
|
image: "doxfood"
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
|
||||||
|
ports:
|
||||||
|
- "${DOXFOOD_SERVER_PORT:-9000}:80"
|
||||||
|
|
||||||
|
environment:
|
||||||
|
TZ: "Europe/Paris"
|
||||||
|
|
||||||
|
restart: unless-stopped
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
server {
|
||||||
|
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html index.htm;
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /50x.html;
|
||||||
|
|
||||||
|
location = /50x.html {
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue