Skip to content

Commit

Permalink
Merge pull request #7 from solution-libre/6-upgrade-to-bareos-v21
Browse files Browse the repository at this point in the history
Upgrade to bareos v21
  • Loading branch information
FlorentPoinsaut authored Jun 9, 2022
2 parents ede796d + 6226b91 commit fd43193
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 10 deletions.
18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ jobs:
- uses: actions/checkout@v2
- name: Check Docker Compose file syntax
run: docker-compose --env-file .env.dist config -q
check-markdown-syntax:
check-syntax:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Lint Markdown
uses: articulate/actions-markdownlint@v1
with:
files: '**/*.md'
- name: Checkout repository
uses: actions/checkout@v2
- name: Lint Markdown
uses: articulate/actions-markdownlint@v1
with:
files: "**/*.md"
- name: Run Shellcheck
uses: azohra/shell-linter@latest
with:
path: "bin/*.sh"
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

<!-- markdownlint-configure-file { "MD024": { "allow_different_nesting": true } } -->

## [2.0.0] 2022-06-09

### Added

- Add API service
- Script to merge Barcus work

### Changed

- Upgrade Bareos to the version 21

## [1.1.1] 2022-06-09

### Added
Expand Down
48 changes: 48 additions & 0 deletions bin/merge-barcus-work.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#!/usr/bin/env sh

CWD=$(pwd)
DIR='barcus-bareos'

cmd_check() {
cmd=$1
if ! command -v "$cmd" > /dev/null
then
echo "$cmd is require and could not be found. Please install it."
exit
fi
}

cmd_check 'git'

if ! git filter-repo --version > /dev/null
then
echo "git-filter-repo is require and could not be found. Please install it."
exit
fi

cd /tmp || exit

git clone https://github.com/barcus/bareos.git "${DIR}"
cd "${DIR}" || exit

git remote rm origin

git filter-repo --force --path LICENSE --path docker-compose-alpine-pgsql.yml

git reset --hard
git gc --aggressive
git prune
git clean -fd

mkdir barcus
git mv LICENSE docker-compose-alpine-pgsql.yml barcus
git commit -m 'move to a subdir'

cd "${CWD}" || exit

git remote add barcus "/tmp/${DIR}"
git merge barcus/master
git reset -- LICENSE
git checkout LICENSE

rm -rf "/tmp/${DIR}"
18 changes: 15 additions & 3 deletions docker-compose-barcus.override.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ services:
- director_config:/etc/bareos
- director_data:/var/lib/bareos # required for MyCatalog backup
environment:
- DB_INIT=true
- DB_UPDATE=true
- DB_INIT=true #should be 'true' if bareos db does not exist
- DB_UPDATE=false
- DB_HOST=bareos-db
- DB_PORT=5432
- DB_NAME=${DB_NAME}
Expand Down Expand Up @@ -50,7 +50,6 @@ services:
- director_config:/etc/bareos-director:ro
- director_data:/var/lib/bareos-director:ro # required for MyCatalog backup
- storage_config:/etc/bareos-storage:ro
- storage_data:/var/lib/bareos-storage:ro
- webui_config:/etc/bareos-webui:ro
networks:
default:
Expand Down Expand Up @@ -88,6 +87,19 @@ services:
default:
ipv4_address: "${NETWORK_PREFIX}.7"

bareos-api:
restart: unless-stopped
# Traefik labels are suggested as an example for people using Traefik,
# remove them if you are using another reverse proxy.
labels:
traefik.enable: 'true'
traefik.frontend.rule: "Host:api.${HOSTNAME}"
traefik.port: '8000'
networks:
web:
default:
ipv4_address: "${NETWORK_PREFIX}.9"

smtpd:
image: ixdotai/smtp
restart: unless-stopped
Expand Down

0 comments on commit fd43193

Please sign in to comment.