Build docker image
This commit is contained in:
		
							
								
								
									
										4
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								.dockerignore
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,4 @@ | ||||
| node_modules/ | ||||
| dist/ | ||||
| tests/ | ||||
| .vscode/ | ||||
							
								
								
									
										3
									
								
								build.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								build.sh
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | ||||
| docker build \ | ||||
|   -f docker/Dockerfile \ | ||||
|   -t antiboredom/ffmpeg-explorer . | ||||
							
								
								
									
										15
									
								
								docker/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								docker/Dockerfile
									
									
									
									
									
										Normal 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 | ||||
							
								
								
									
										8
									
								
								docker/docker-compose.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								docker/docker-compose.yaml
									
									
									
									
									
										Normal 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
									
								
							
							
						
						
									
										19
									
								
								docker/etc/nginx.conf
									
									
									
									
									
										Normal 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; | ||||
|     } | ||||
|   } | ||||
| } | ||||
		Reference in New Issue
	
	Block a user