diff --git a/.dockerignore b/.dockerignore index b0a5752..6d059af 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,19 @@ frontend/ +velxio/ +flowchart/ +compiler_worker/ +velxio-deployer-firmware/ +load-test/ +.browser-test/ +.pytest_cache/ +.git/ __pycache__/ *.pyc state/ config/ documentation.md podman-compose.yml +podman-compose.velxio.yml +lms-c-precompiled.tar .dockerignore + diff --git a/Dockerfile b/Dockerfile index f992f56..86e3bcd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,11 +15,16 @@ WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -# Copy application code -COPY . . +# Copy backend application code only with non-root ownership +COPY --chown=app:app app.py config.py extensions.py gunicorn.conf.py alembic.ini pytest.ini ./ +COPY --chown=app:app routes/ ./routes/ +COPY --chown=app:app services/ ./services/ +COPY --chown=app:app scripts/ ./scripts/ +COPY --chown=app:app migrations/ ./migrations/ +COPY --chown=app:app docs/ ./docs/ +COPY --chown=app:app help/ ./help/ +COPY --chown=app:app compiler/ ./compiler/ -# Change ownership to the app user -RUN chown -R app:app /app USER app # Expose port 5000