From 3334bb0ef6c440c86c183dae339137362869ed0e Mon Sep 17 00:00:00 2001 From: Dorian Zedler Date: Sun, 3 Oct 2021 19:47:03 +0200 Subject: [PATCH] Add readme and workflow --- .github/workflows/release.yml | 50 +++++++++++++++++++++ README.md | 82 ++++++++++++++++++++++++++++++++++- 2 files changed, 130 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2676f58 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,50 @@ +name: "Build release" + +on: + push: + tags: + - "v*" + +jobs: + push_to_registry: + name: Push Docker image to Docker Hub + runs-on: ubuntu-latest + steps: + - name: Check out the repo + uses: actions/checkout@v2 + + - name: Log in to Docker Hub + uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9 + with: + username: dorianim + password: ${{ secrets.DOCKER_HUB_TOKEN }} + + - name: Extract metadata (tags, labels) for Docker + id: meta + uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 + with: + images: dorianim/mrbs + tags: type=ref,event=tag + + - name: Build and push Docker image + uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + + tagged-release: + name: "Tagged Release" + runs-on: "ubuntu-latest" + needs: push_to_registry + + steps: + # ... + - name: "Build & test" + run: | + echo "done!" + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.GITHUB_TOKEN }}" + prerelease: false \ No newline at end of file diff --git a/README.md b/README.md index 3db8e9b..67cb1e6 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,80 @@ -# mrbs-docker -Docker image for the meeting-room-booking-system including my modern-mrbs-theme +

+ Mrbs-docker +

+ +

+ + GitHub release + + + + + + Badge release image + + + Docker pulls + +

+ +This is a docker container for the [Meeting room booking system](https://github.com/meeting-room-booking-system/mrbs-code). + +## Features +- Automatic installation + +# Installation +1. Create a folder for installation: + ```bash + mkdir /opt/mrbs-docker && cd /opt/mrbs-docker + ``` +2. Create the file docker-compose.yml with this content: + ```yaml + version: "2" + services: + mrbs: + image: dorianim/mrbs-docker + container_name: mrbs + environment: + - PUID=1000 + - PGID=1000 + - DB_HOST=mrbs-db + - DB_USER=mrbs-user + - DB_PASS=mrbs-pass + - DB_DATABASE=mrbs + volumes: + - ./config/mrbs:/config + ports: + - 8888:80 + restart: unless-stopped + depends_on: + - mrbs-db + mrbs-db: + image: mariadb:latest + container_name: mrbs_db + environment: + - PUID=1000 + - PGID=1000 + - MYSQL_ROOT_PASSWORD=mrbs-root-pass + - TZ=Europe/London + - MYSQL_DATABASE=mrbs + - MYSQL_USER=mrbs-user + - MYSQL_PASSWORD=mrbs-pass + volumes: + - ./config/mysql:/var/lib/mysql + restart: unless-stopped + ``` +1. Adjust the port (default `8888`) to your needs +2. Start the mrbs-docker: + ```bash + docker-compose up -d + ``` +3. Done! You can reach your mrbs-docker on `localhost:5080` +4. Adjust your `config.inc.php` in `/opt/mrbs-docker/config/www/config.inc.php` + +# Updating +To update, just go to your installation folder and pull +```bash +cd /opt/mrbs-docker +docker-compose pull +docker-compose down && docker-compose up -d +``` \ No newline at end of file