From dd1f3f89d561af97649c5441c9a3d60bbd19d42b Mon Sep 17 00:00:00 2001 From: Guillaume Bournique Date: Fri, 20 Dec 2024 21:32:02 +0100 Subject: [PATCH] fix: fix various issues --- .github/workflows/ci.yml | 7 +++++++ dashboard.Dockerfile | 5 ++++- docker-compose.yml | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5161ed..cc9b0d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -237,6 +237,13 @@ jobs: - name: Set up Docker uses: docker/setup-buildx-action@v3 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Get latest git tag run: | git fetch --tags diff --git a/dashboard.Dockerfile b/dashboard.Dockerfile index 7fe7da0..3a41246 100644 --- a/dashboard.Dockerfile +++ b/dashboard.Dockerfile @@ -25,5 +25,8 @@ HEALTHCHECK --interval=30s --timeout=3s \ # Command for production server CMD ["gunicorn", "portfolio_analytics.dashboard.dashboard_main:server", \ "--bind", "0.0.0.0:8050", \ - "--workers", "4", \ + "--workers", "2", \ + "--threads", "4", \ + "--worker-class", "gthread", \ + "--worker-tmp-dir", "/dev/shm", \ "--log-level", "info"] diff --git a/docker-compose.yml b/docker-compose.yml index cab38e1..ecd8a9b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,7 +7,7 @@ services: ports: - "8000:8000" volumes: - - ./data:/app/portfolio_analytics/common/data + - ./portfolio_analytics/common/data:/app/portfolio_analytics/common/data # Runs container processes with host user's UID/GID to avoid permission issues # Files created in volumes will be owned by the host user instead of root user: "${UID:-1000}:${GID:-1000}" @@ -27,7 +27,7 @@ services: ports: - "8050:8050" volumes: - - ./data:/app/portfolio_analytics/common/data + - ./portfolio_analytics/common/data:/app/portfolio_analytics/common/data # Runs container processes with host user's UID/GID to avoid permission issues # Files created in volumes will be owned by the host user instead of root user: "${UID:-1000}:${GID:-1000}"