mirror of
https://github.com/Dictionarry-Hub/profilarr.git
synced 2026-01-22 10:51:02 +01:00
feat: update production Dockerfile and docker-compose for improved deployment
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
# backend/Dockerfile.prod
|
||||
# Build frontend
|
||||
FROM node:18 AS frontend-builder
|
||||
WORKDIR /frontend
|
||||
COPY frontend/package*.json ./
|
||||
RUN npm install
|
||||
COPY frontend/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Backend
|
||||
# Dockerfile
|
||||
FROM python:3.9
|
||||
WORKDIR /app
|
||||
COPY backend/requirements.txt .
|
||||
|
||||
COPY dist/backend/* .
|
||||
COPY dist/static ./app/static
|
||||
COPY dist/requirements.txt .
|
||||
|
||||
RUN pip install --no-cache-dir -r requirements.txt
|
||||
COPY backend/ .
|
||||
COPY --from=frontend-builder /frontend/dist ./app/static
|
||||
CMD ["python", "-m", "app.main"]
|
||||
|
||||
# Add labels for Docker Hub
|
||||
LABEL org.opencontainers.image.authors="Dictionarry dictionarry@pm.me"
|
||||
LABEL org.opencontainers.image.description="Profilarr - Profile manager for *arr apps"
|
||||
LABEL org.opencontainers.image.source="https://github.com/Dictionarry-Hub/profilarr"
|
||||
LABEL org.opencontainers.image.title="Profilarr"
|
||||
LABEL org.opencontainers.image.version="beta"
|
||||
|
||||
CMD ["gunicorn", "--bind", "0.0.0.0:6868", "app.main:create_app()"]
|
||||
@@ -5,4 +5,5 @@ requests==2.26.0
|
||||
Werkzeug==2.0.1
|
||||
GitPython==3.1.24
|
||||
regex==2023.10.3
|
||||
APScheduler==3.10.4
|
||||
APScheduler==3.10.4
|
||||
gunicorn==21.2.0
|
||||
@@ -1,20 +1,18 @@
|
||||
# docker-compose.prod.yml
|
||||
# docker-compose.yml
|
||||
version: '3.8'
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: backend/Dockerfile.prod
|
||||
profilarr:
|
||||
image: yourusername/profilarr:latest # For Docker Hub
|
||||
container_name: profilarr
|
||||
ports:
|
||||
- '5000:5000'
|
||||
- 6868:6868
|
||||
volumes:
|
||||
- profilarr_data:/config
|
||||
environment:
|
||||
- FLASK_ENV=production
|
||||
- TZ=Australia/Adelaide
|
||||
env_file:
|
||||
- .env.prod
|
||||
restart: always
|
||||
- .env
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
profilarr_data:
|
||||
|
||||
Reference in New Issue
Block a user