Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -103,3 +103,6 @@ ENV/

# documentation
docs

# Node
node_modules
16 changes: 8 additions & 8 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: ubuntu-latest - Docker - lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Run hadolint
uses: reviewdog/action-hadolint@v1
Expand All @@ -26,7 +26,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6

- name: Set Environment Variables
run: |
Expand All @@ -38,7 +38,7 @@ jobs:

- name: Set up QEMU
id: qemu-setup
uses: docker/setup-qemu-action@master
uses: docker/setup-qemu-action@v3
with:
platforms: all

Expand All @@ -47,21 +47,21 @@ jobs:

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@master
uses: docker/setup-buildx-action@v3
with:
driver: docker-container
use: true

- name: Login to DockerHub
if: github.event_name == 'push'
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build and push latest
if: github.event_name == 'push' && !startsWith(github.ref, 'refs/tags') && github.ref == 'refs/heads/master'
uses: docker/build-push-action@master
uses: docker/build-push-action@v6
with:
context: .
builder: ${{ steps.buildx.outputs.name }}
Expand All @@ -72,8 +72,8 @@ jobs:
TENTACLES_URL_TAG=${{ env.LATEST }}

- name: Build and push on tag
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: docker/build-push-action@master
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ jobs:
type: [ sources ]

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.13.x
architecture: x64
Expand Down Expand Up @@ -63,9 +63,9 @@ jobs:
name: Source distribution - Python - deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: 3.13.x
architecture: x64
Expand Down
12 changes: 11 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
FROM python:3.13-slim-buster AS base
FROM node:22-slim AS frontend

WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY octobot_script/resources/report/ octobot_script/resources/report/
COPY vite.config.ts tsconfig*.json ./
RUN npm run build

FROM python:3.13-slim-bullseye AS base

WORKDIR /app

Expand All @@ -7,6 +16,7 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends build-essential git gcc binutils

COPY . .
COPY --from=frontend /app/octobot_script/resources/report/dist/ octobot_script/resources/report/dist/

RUN pip3 install --no-cache-dir -U setuptools wheel pip \
&& pip3 install --no-cache-dir -r requirements.txt \
Expand Down
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@


def _build_report():
if os.path.isfile(REPORT_DIST):
print(f"[report] Pre-built bundle found → {REPORT_DIST}, skipping JS build.")
return

npm = "npm"

print("[report] Installing JS dependencies…")
Expand Down
Loading