Added first docker build and compose
This commit is contained in:
parent
64559d3668
commit
d4ed7d9f76
3 changed files with 35 additions and 1 deletions
24
Dockerfile
Normal file
24
Dockerfile
Normal file
|
@ -0,0 +1,24 @@
|
|||
FROM node:23 AS frontend-builder
|
||||
|
||||
WORKDIR /app/frontend
|
||||
|
||||
COPY frontend/package.json frontend/package-lock.json ./
|
||||
RUN npm install
|
||||
|
||||
COPY frontend ./
|
||||
RUN npm run build
|
||||
|
||||
FROM python:3.12
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY requirements.txt .
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
|
||||
COPY . .
|
||||
|
||||
COPY --from=frontend-builder /app/frontend/dist /app/frontend/dist
|
||||
|
||||
EXPOSE 5000
|
||||
|
||||
CMD ["python", "run.py"]
|
10
docker-compose.yml
Normal file
10
docker-compose.yml
Normal file
|
@ -0,0 +1,10 @@
|
|||
services:
|
||||
toloka2webmd3:
|
||||
build: .
|
||||
ports:
|
||||
- "5000:5000"
|
||||
volumes:
|
||||
- ./data:/data
|
||||
- ./instance:/instance
|
||||
environment:
|
||||
- FLASK_ENV=production
|
2
run.py
2
run.py
|
@ -1,3 +1,3 @@
|
|||
from app import app
|
||||
|
||||
app.run(port=5000)
|
||||
app.run(host="0.0.0.0", port=5000)
|
Loading…
Reference in a new issue