From 15451d91b065a327e9e687e9b2ed5703d7699d1c Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sat, 11 Jan 2025 22:11:24 +0100 Subject: [PATCH 01/15] chore: :arrow_up: upgrade to latest runner version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ec699a6..bc5b4e7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:20.04 -ARG RUNNER_VERSION="2.294.0" +ARG RUNNER_VERSION="2.321.0" # Prevents installdependencies.sh from prompting the user and blocking the image creation ARG DEBIAN_FRONTEND=noninteractive From b1f062f5a8cce92fd267481534a50e92dd8fd059 Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sat, 11 Jan 2025 22:12:18 +0100 Subject: [PATCH 02/15] chore: :arrow_up: upgrade to latest ubuntu version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bc5b4e7..bb9d611 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:24.04 ARG RUNNER_VERSION="2.321.0" From b3c6fa142c9e05e2bb4e73010af2951f1d6923cb Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sat, 11 Jan 2025 22:25:02 +0100 Subject: [PATCH 03/15] feat: :sparkles: add docker compose config --- docker-compose.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..047c861 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,14 @@ +services: + runner: + build: . + restart: always + deploy: + mode: replicated + replicas: 4 + resources: + limits: + cpus: 0.35 + memory: 300M + reservations: + cpus: 0.25 + memory: 128M \ No newline at end of file From 3d159ddcca7c88e6e323df511278ac8a0e0c7863 Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sat, 11 Jan 2025 23:55:07 +0100 Subject: [PATCH 04/15] fix: :bug: downgrade to ubuntu 22.04 - 24.04 is not ready yet --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bb9d611..a691f4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:24.04 +FROM ubuntu:22.04 ARG RUNNER_VERSION="2.321.0" From 4c7eba6267dbb639a40f7beb369ea6ca1fa71c35 Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sat, 11 Jan 2025 23:56:28 +0100 Subject: [PATCH 05/15] feat: :sparkles: use .env file for secrets --- .env.example | 2 ++ .gitignore | 1 + docker-compose.yml | 1 + 3 files changed, 4 insertions(+) create mode 100644 .env.example create mode 100644 .gitignore diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..b914ed2 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +REPO=/ +TOKEN= \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2eea525 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 047c861..7ac0b9e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,6 +2,7 @@ services: runner: build: . restart: always + env_file: .env deploy: mode: replicated replicas: 4 From 041aabc7a137dbcc5e1146f5cc408a586b99e6a7 Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sat, 11 Jan 2025 23:56:57 +0100 Subject: [PATCH 06/15] feat: :sparkles: allow access to docker sock from within --- docker-compose.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker-compose.yml b/docker-compose.yml index 7ac0b9e..4513b78 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,6 +3,8 @@ services: build: . restart: always env_file: .env + volumes: + - /var/run/docker.sock:/var/run/docker.sock deploy: mode: replicated replicas: 4 From d6ad2ec7cb7356d9c7b6783660ec4ad58ccbc52c Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sun, 12 Jan 2025 00:01:03 +0100 Subject: [PATCH 07/15] fix: :fire: remove unused workflow --- .github/workflows/github-ci.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/github-ci.yml diff --git a/.github/workflows/github-ci.yml b/.github/workflows/github-ci.yml deleted file mode 100644 index 8374996..0000000 --- a/.github/workflows/github-ci.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: Django CI - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - docker: - runs-on: ubuntu-latest - steps: - - name: Set up QEMU - uses: docker/setup-qemu-action@v2 - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - name: Login to DockerHub - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Build and push - uses: docker/build-push-action@v3 - with: - push: true - tags: dockerbeikeni/github-runner-02 \ No newline at end of file From 0bcc46c91a5ae497bcfb01b570ca2c4cdb94a543 Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sun, 12 Jan 2025 01:02:33 +0100 Subject: [PATCH 08/15] fix: :bug: remove resource limits and increase reservations --- docker-compose.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4513b78..7e4cdbb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,9 +9,6 @@ services: mode: replicated replicas: 4 resources: - limits: - cpus: 0.35 - memory: 300M reservations: - cpus: 0.25 - memory: 128M \ No newline at end of file + cpus: 0.5 + memory: 1024M \ No newline at end of file From 7a80a9d68b2950e63f291374fc6ead316eda59fd Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sun, 12 Jan 2025 01:03:58 +0100 Subject: [PATCH 09/15] feat: :heavy_plus_sign: install `git`, `uzip` and `libasound2` --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a691f4b..84df2e6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,9 +7,8 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ - curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip - - + curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip git unzip libasound2 + RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \ && tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz From ee068ddeefdbd2b21dd89dbd458ec943203df21b Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sun, 12 Jan 2025 01:04:24 +0100 Subject: [PATCH 10/15] fix: :arrow_up: upgrade pip to the latest version --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 84df2e6..e33e5a1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,6 +9,8 @@ RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip git unzip libasound2 +RUN python3 -m pip install --upgrade pip + RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \ && tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz From 71a647bf460db3e47f2848b24a535d1cc3918b5f Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sun, 12 Jan 2025 13:46:31 +0100 Subject: [PATCH 11/15] feat: :sparkles: install `node` lts version and `yarn` --- Dockerfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Dockerfile b/Dockerfile index e33e5a1..8867d97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,4 +26,14 @@ RUN chmod +x start.sh # set the user to "docker" so all subsequent commands are run as the docker user USER docker +ENV NODE_VERSION=22.13.0 +RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash +ENV NVM_DIR=/home/docker/.nvm +RUN . "$NVM_DIR/nvm.sh" && nvm install ${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm use v${NODE_VERSION} +RUN . "$NVM_DIR/nvm.sh" && nvm alias default v${NODE_VERSION} +ENV PATH="$NVM_DIR/versions/node/v${NODE_VERSION}/bin/:${PATH}" + +RUN npm install --global yarn + ENTRYPOINT ["./start.sh"] From 04a3b36942cc93e26819809031805b2adc064410 Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sun, 12 Jan 2025 14:08:17 +0100 Subject: [PATCH 12/15] chore: :arrow_up: upgrade ubuntu to 24.04 --- Dockerfile | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8867d97..48f67e9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:22.04 +FROM ubuntu:24.04 ARG RUNNER_VERSION="2.321.0" @@ -7,9 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ - curl jq build-essential libssl-dev libffi-dev python3 python3-venv python3-dev python3-pip git unzip libasound2 - -RUN python3 -m pip install --upgrade pip + curl jq build-essential libssl-dev libffi-dev libicu-dev python3 python3-venv python3-dev python3-pip git unzip libasound2t64 RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \ From bc96f2057cc4dcd666a27e67a67b1a8e9bdd8dbf Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Sun, 12 Jan 2025 17:39:08 +0100 Subject: [PATCH 13/15] feat: :heavy_plus_sign: add `playwright` dependencies --- Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 48f67e9..502cff5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,11 +9,14 @@ RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ curl jq build-essential libssl-dev libffi-dev libicu-dev python3 python3-venv python3-dev python3-pip git unzip libasound2t64 +# playwright deps +RUN apt install -y libglib2.0-0t64 libnss3 libnspr4 libdbus-1-3 libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 libdrm2 libxcb1 libxkbcommon0 libatspi2.0-0t64 libx11-6 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2 + RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ && curl -O -L https://github.com/actions/runner/releases/download/v${RUNNER_VERSION}/actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz \ && tar xzf ./actions-runner-linux-x64-${RUNNER_VERSION}.tar.gz -RUN chown -R docker ~docker && /home/docker/actions-runner/bin/installdependencies.sh +RUN chown -R docker /home/docker && /home/docker/actions-runner/bin/installdependencies.sh COPY start.sh start.sh From f1fc285ca62bbd055850aafcf74751b9c7472b1a Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Fri, 21 Mar 2025 02:55:31 +0000 Subject: [PATCH 14/15] feat: :sparkles: add local caching server --- .env.example | 3 ++- Dockerfile | 4 +++- docker-compose.yml | 24 ++++++++++++++++++++++-- 3 files changed, 27 insertions(+), 4 deletions(-) diff --git a/.env.example b/.env.example index b914ed2..a3c2f95 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,3 @@ REPO=/ -TOKEN= \ No newline at end of file +TOKEN= +ACTIONS_RESULTS_URL=http://cache:3000/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 502cff5..fc00c3a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:24.04 -ARG RUNNER_VERSION="2.321.0" +ARG RUNNER_VERSION="2.322.0" # Prevents installdependencies.sh from prompting the user and blocking the image creation ARG DEBIAN_FRONTEND=noninteractive @@ -18,6 +18,8 @@ RUN cd /home/docker && mkdir actions-runner && cd actions-runner \ RUN chown -R docker /home/docker && /home/docker/actions-runner/bin/installdependencies.sh +RUN sed -i 's/\x41\x00\x43\x00\x54\x00\x49\x00\x4F\x00\x4E\x00\x53\x00\x5F\x00\x52\x00\x45\x00\x53\x00\x55\x00\x4C\x00\x54\x00\x53\x00\x5F\x00\x55\x00\x52\x00\x4C\x00/\x41\x00\x43\x00\x54\x00\x49\x00\x4F\x00\x4E\x00\x53\x00\x5F\x00\x52\x00\x45\x00\x53\x00\x55\x00\x4C\x00\x54\x00\x53\x00\x5F\x00\x4F\x00\x52\x00\x4C\x00/g' /home/docker/actions-runner/bin/Runner.Worker.dll + COPY start.sh start.sh # make the script executable diff --git a/docker-compose.yml b/docker-compose.yml index 7e4cdbb..2508cd4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,9 @@ services: runner: build: . - restart: always + restart: unless-stopped + networks: + - backend env_file: .env volumes: - /var/run/docker.sock:/var/run/docker.sock @@ -11,4 +13,22 @@ services: resources: reservations: cpus: 0.5 - memory: 1024M \ No newline at end of file + memory: 1024M + cache: + image: ghcr.io/falcondev-oss/github-actions-cache-server:latest + restart: unless-stopped + networks: + - backend + ports: + - '3000:3000' + environment: + API_BASE_URL: http://cache:3000 + volumes: + - cache:/app/.data + +volumes: + cache: + +networks: + backend: + external: false \ No newline at end of file From ea10b8d53d00b3de89ed5c4a1a1b539f08bb995f Mon Sep 17 00:00:00 2001 From: Lukas Runge Date: Mon, 22 Sep 2025 16:37:57 +0000 Subject: [PATCH 15/15] feat: :heavy_plus_sign: install `pulseaudio` --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index fc00c3a..420f784 100644 --- a/Dockerfile +++ b/Dockerfile @@ -7,7 +7,7 @@ ARG DEBIAN_FRONTEND=noninteractive RUN apt update -y && apt upgrade -y && useradd -m docker RUN apt install -y --no-install-recommends \ - curl jq build-essential libssl-dev libffi-dev libicu-dev python3 python3-venv python3-dev python3-pip git unzip libasound2t64 + curl jq build-essential libssl-dev libffi-dev libicu-dev python3 python3-venv python3-dev python3-pip git unzip libasound2t64 pulseaudio # playwright deps RUN apt install -y libglib2.0-0t64 libnss3 libnspr4 libdbus-1-3 libatk1.0-0t64 libatk-bridge2.0-0t64 libcups2t64 libdrm2 libxcb1 libxkbcommon0 libatspi2.0-0t64 libx11-6 libxcomposite1 libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 libpango-1.0-0 libcairo2