Merge pull request #9 from HitomaruKonpaku/main

Build docker image
This commit is contained in:
Sam Lavigne 2023-08-29 10:00:24 -04:00 committed by GitHub
commit ea63286dbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 49 additions and 0 deletions

4
.dockerignore Normal file
View File

@ -0,0 +1,4 @@
node_modules/
dist/
tests/
.vscode/

3
build.sh Normal file
View File

@ -0,0 +1,3 @@
docker build \
-f docker/Dockerfile \
-t antiboredom/ffmpeg-explorer .

15
docker/Dockerfile Normal file
View File

@ -0,0 +1,15 @@
FROM node:18-alpine AS build
WORKDIR /app
COPY package.json .
COPY package-lock.json .
RUN npm ci
COPY . .
RUN npm run build
FROM nginx:stable-alpine-slim
COPY ./docker/etc/nginx.conf /etc/nginx/nginx.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 80

View File

@ -0,0 +1,8 @@
---
services:
ffmpeg-explorer:
image: antiboredom/ffmpeg-explorer
container_name: ffmpeg-explorer
restart: unless-stopped
ports:
- 3000:80

19
docker/etc/nginx.conf Normal file
View File

@ -0,0 +1,19 @@
events {
multi_accept on;
}
http {
include /etc/nginx/mime.types;
server_tokens off;
server {
listen 80;
charset utf-8;
sendfile on;
root /usr/share/nginx/html;
location / {
try_files $uri $uri/ /index.html = 404;
}
}
}