diff --git a/.containerignore b/.containerignore new file mode 100644 index 0000000..3d20e8d --- /dev/null +++ b/.containerignore @@ -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__ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..084567a --- /dev/null +++ b/Dockerfile @@ -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 diff --git a/main.py b/app/main.py similarity index 100% rename from main.py rename to app/main.py diff --git a/front/public/watermelon.mp4 b/front/public/watermelon.mp4 new file mode 100644 index 0000000..21efaf3 Binary files /dev/null and b/front/public/watermelon.mp4 differ diff --git a/front/src/pages/HomePage.jsx b/front/src/pages/HomePage.jsx index 3ce424a..7579254 100644 --- a/front/src/pages/HomePage.jsx +++ b/front/src/pages/HomePage.jsx @@ -30,7 +30,7 @@ const mock = [ id: 5, name: "Огурец", category: "fruits_vegatables", - src: null, + src: "https://upload.wikimedia.org/wikipedia/commons/thumb/2/24/Marketvegetables.jpg/800px-Marketvegetables.jpg", bestBy: 10000, description: "Очень вкусный огурец, прям, закачаешься", lat: 59.9724, @@ -42,7 +42,7 @@ const mock = [ id: 9, name: "Арбуз", category: "soup", - src: "https://samplelib.com/lib/preview/mp4/sample-5s.mp4", + src: "/static/watermelon.mp4", bestBy: 20000, description: "Очень вкусный арбуз, прям, закачаешься", lat: 60.9724,