Skip to content

run-compose

run-compose #197

Workflow file for this run

name: run-compose
on:
push:
paths:
- 'docker-compose*'
- '.github/workflows/run-compose.yml'
pull_request:
paths:
- 'docker-compose*'
- '.github/workflows/run-compose.yml'
branches:
- master
workflow_dispatch:
schedule:
- cron: '0 5 * * 0'
jobs:
test-compose:
runs-on: ubuntu-latest
strategy:
matrix:
module: [alpine-mysql, alpine-mysql-v2, ubuntu-mysql, ubuntu-pgsql, alpine-pgsql]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create required folder
run: |
sudo mkdir -p /data/bareos/config/director
sudo mkdir -p /data/bareos/data/director
sudo mkdir -p /data/bareos/config/storage
sudo mkdir -p /data/bareos/data/storage
sudo mkdir -p /data/bareos/config/client
sudo mkdir -p /data/bareos/config/webui
sudo mkdir -p /data/bareos/data/webui
sudo mkdir -p /data/mysql/data
sudo mkdir -p /data/pgsql/data
sudo chmod 777 /data/bareos /data/mysql /data/pgsql
- name: Run docker-compose
run: |
cp .env.dist .env
sed -i 's#DB_INIT=false#DB_INIT=true#' docker-compose-${{ matrix.module }}.yml
docker-compose -f docker-compose-${{ matrix.module }}.yml up -d
- name: Wait 60s then run Bareos console
run: |
sleep 60
docker exec bareos_bareos-dir_1 bconsole