Fixes
This commit is contained in:
parent
8a95c116f1
commit
440c413152
|
@ -0,0 +1,14 @@
|
|||
FROM python:3.10-slim
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p /app/data \
|
||||
&& chmod +x /app/entrypoint.sh
|
||||
|
||||
EXPOSE 8143
|
||||
|
||||
ENTRYPOINT ["./entrypoint.sh"]
|
|
@ -0,0 +1,9 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
if [ -z "$(ls -A /app/alembic/versions)" ]; then
|
||||
alembic revision --autogenerate -m "Initial migration"
|
||||
fi
|
||||
|
||||
alembic upgrade head
|
||||
exec uvicorn app.main:app --host 0.0.0.0 --port 8143
|
|
@ -0,0 +1,31 @@
|
|||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ./backend
|
||||
dockerfile: Dockerfile
|
||||
container_name: govorov-backend
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- ./backend/.env
|
||||
environment:
|
||||
- DATABASE_URL=sqlite:///./data/glass_cutting.db
|
||||
volumes:
|
||||
- glass_db:/app/data
|
||||
ports:
|
||||
- "8143:8143"
|
||||
|
||||
frontend:
|
||||
build:
|
||||
context: ./frontend
|
||||
dockerfile: Dockerfile
|
||||
container_name: govorov-frontend
|
||||
environment:
|
||||
- VITE_API_URL:https://govorov.itqop.pw/api
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- "4173:4173"
|
||||
|
||||
volumes:
|
||||
glass_db:
|
|
@ -0,0 +1,8 @@
|
|||
FROM node:23.11.0-alpine
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
EXPOSE 4173
|
||||
CMD ["npm", "run", "preview", "--", "--host", "0.0.0.0", "--port", "4173"]
|
Loading…
Reference in New Issue