Skip to content

fix: performance

fix: performance #24

Workflow file for this run

name: Build and run Docker container
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
jobs:
build:
runs-on: self-hosted
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v4
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-${{ github.sha }}
restore-keys: |
${{ runner.os }}-docker-
- name: Create PostgreSQL data directory
run: |
sudo mkdir -p /root/mydata/postgresql-data
sudo chown -R 999:999 /root/mydata/postgresql-data
- name: Stop running Docker containers
run: sudo docker compose down || true
- name: Build and start Docker containers
run: sudo docker compose up -d --build --cache-from type=local,src=/tmp/.buildx-cache --cache-to type=local,dest=/tmp/.buildx-cache