Deploy ready

This commit is contained in:
Dmitriy Shishkov 2023-05-15 11:16:22 +03:00
parent 619aead639
commit 8626e92c9c
Signed by: dm1sh
GPG Key ID: 027994B0AA357688
5 changed files with 47 additions and 2 deletions

31
.containerignore Normal file
View File

@ -0,0 +1,31 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.venv
*.db
.env
__pycache__

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM node:18-alpine as builder
WORKDIR /src
COPY ./front/package.json front/package-lock.json .
RUN npm ci
COPY front .
RUN npm run build
FROM python:3-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir --upgrade -r requirements.txt
COPY ./app ./app
COPY --from=builder /src/dist ./front/dist
CMD uvicorn app.main:app --host 0.0.0.0 --port 80

BIN
front/public/watermelon.mp4 Normal file

Binary file not shown.

View File

@ -30,7 +30,7 @@ const mock = [
id: 5, id: 5,
name: "Огурец", name: "Огурец",
category: "fruits_vegatables", category: "fruits_vegatables",
src: null, src: "https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Marketvegetables.jpg/800px-Marketvegetables.jpg",
bestBy: 10000, bestBy: 10000,
description: "Очень вкусный огурец, прям, закачаешься", description: "Очень вкусный огурец, прям, закачаешься",
lat: 59.9724, lat: 59.9724,
@ -42,7 +42,7 @@ const mock = [
id: 9, id: 9,
name: "Арбуз", name: "Арбуз",
category: "soup", category: "soup",
src: "https://samplelib.com/lib/preview/mp4/sample-5s.mp4", src: "/static/watermelon.mp4",
bestBy: 20000, bestBy: 20000,
description: "Очень вкусный арбуз, прям, закачаешься", description: "Очень вкусный арбуз, прям, закачаешься",
lat: 60.9724, lat: 60.9724,